It's in my book, but unexplained. It reverses a 2-digit number. But I don't get how the operations work....Shouldn't it give zero each time? Could someone please explain what's happening?
int number, last_digit, next_digit, rev_number;
printf("Enter the number to be reversed:");
next_digit=(number/10) - ((number/100)*10);
printf("The reversed number is:%d", rev_number);