Printing Reverse Of Given Number
#include<stdio.h>
#include<conio.h>
void main()
{
int num,res;
clrscr();
printf("Enter A Number :- ");
scanf("%d",&num);
while(num>0)
{
res=num%10;
printf("%d",res);
num=num/10;
}
getch();
}
Output:-
Enter A Number :- 213
312
Comments
Post a Comment