Re: Subtract smaller or larger number from x?



Yes, of course
As my sis pointed out you can take the absolute value of the difference
like this:
int diff; // the difference between x and y
{
diff =abs( y-x); // where abs() is the absolute value function
}

Regards
Upeksha

.