What's wrong with people? Doesn't anyone know how to try something on their own first? **** man, how long does it take to throw some test code together:
How do we do this ? we can't use number%10 ....
then how do we know the remainder ?
Stick it in a loop and play around with it. Arrrg. I'm so freeking tired of every one wanting everything handed to them.
int main ( void )
int x = 1234,y,z;
printf("%d / 10 = %d, %d % 10 = %d", x, y=x/10, x, z=x%10 );
The whole point of programming is so you can figure out how to solve a problem. How is me giving you the freeking answer helping you learn problemsolving?