#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n, r=0, b;
printf("Enter any number:");
scanf("%d",&n);
// Loop to reverse the number
while(n > 0)
{
b=n%10;
r=r*10+b;
n=n/10;
}
printf("Number reverse form is: %d", r) getch();
}
----------------------------
OUTPUT
----------------------------
Enter any number: 123
Number reverse form is: 321
JUMP STATEMENTS IN C >>
No comments:
Post a Comment