#include<stdio.h>
#include<conio.h>
void main()
{
int rev=0,r,n;
clrscr();
printf("enter a number:");
scanf("%d",&n);
while(n!=0)
{
r=n%10;
rev=rev*10+r;
n=n/10;
}
printf("the revers of the no. is:=%d\n",rev);
getch();
}
|
Output:-
______________________________________________________
______________________________________________________
______________________________________________________
_____________________________________________________
Post a Comment