C Program Tutorial to reverse a number
Learn how to ues C Codes
Start your own Program
#include
int main()
{
int n, reverse=0, rem;
printf("Enter a number: ");
scanf("%d", &n);
while(n!=0)
{
rem=n%10;
reverse=reverse*10+rem;
n/=10;
}
printf("Reversed Number: %d",reverse);
return 0;
}
Enter a Number: 456
Reverse a Number: 654