#include <stdio.h>
#include <conio.h>
void main()
{
int n,r,reverse=0;
clrscr();
printf("Enter any Number: ");
scanf("%d",&n);
while(n)
{
r=n%10;
reverse=reverse*10+r;
n=n/10;
}
printf("Reverse= %d",reverse);
getch();
}
#include <conio.h>
void main()
{
int n,r,reverse=0;
clrscr();
printf("Enter any Number: ");
scanf("%d",&n);
while(n)
{
r=n%10;
reverse=reverse*10+r;
n=n/10;
}
printf("Reverse= %d",reverse);
getch();
}
No comments:
Post a Comment