#include<stdio.h>
#include<conio.h>
void main()
{
int no,d,sc,rev=0;
clrscr();
printf("\nenter no(find for reverse)=");
scanf("%d",&no);
sc=no; //second copy of no
while(no>0)
{
d=no%10;
rev=rev*10+d;
no=no/10;
}
printf("\n \n %d is rev",rev);
getch();
}
OUTPUT
enter no(find for reverse)=123
321 is rev
Tweet
Comments
Post a Comment