Hi
I am able to write program that print reverse number example 10 9 8 7 6 5 4 3 2 1
Now I want to write c program that reverse the number entered by the user and then prints the reversed number on the screen. For example if user enter 123 as input then 321 is printed as output. I have seen some program on internet but I don't understand the logic behind program. so looking help with basics
I am able to write program that print reverse number example 10 9 8 7 6 5 4 3 2 1
C:
#include <stdio.h>
int main()
{
int i =10; / decleration of variable
while(i>=1)
{
printf("%d \n", i);
i--;
}
return 0;
}
Now I want to write c program that reverse the number entered by the user and then prints the reversed number on the screen. For example if user enter 123 as input then 321 is printed as output. I have seen some program on internet but I don't understand the logic behind program. so looking help with basics