0
Reverse number
Reverse a number mean moving the digit at the last position to the first'position and vice versa
3 Answers
+ 5
Your code is correct then what's your question?
+ 1
this place is for asking questions not for asking answer , use feed section for solutions or answer others questions
0
#include <stdio.h>
int main()
{
int n,r,rev=0;
printf("\n Enter a number:");
scanf("%d",&n);
while(n!=0)
{
r=n%10;
rev=(rev*10)+r;
n/=10;
}
printf("Reversed string=%d", rev);
}