#include<stdio.h>
#include<conio.h>
void
main()
{
int
n,rev,s=0;
clrscr();
printf("Enter
the value of N");
scanf("%d",&n);
while(n>0)
{
r=n%10;
s=(s*10)+r;
n=n/10;
}
printf("\nThe
reverse of the number is %d",s);
getch();
}
No comments:
Post a Comment