1.) For printing the integer in reverse order.
#include <stdio.h>
main()
{
int i;
scanf("%d",&i);
while(i!=0)
{printf("%d",i%10);
i=(i-(i%10))/10;
}
getch();
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---