reverse of 3 digit number in c language using variable
reverse of 3 digit number in c language using variable
Program:-
#include<stdio.h>
#include<conio.h>
main()
{
int n,q,r,rev=0;
clrscr();
printf("enter any three digit number");
scanf("%d",&n);
q=n/10;
r=n%10;
rev=rev*10+r;
printf("%d",rev);
n=q;
q=n/10;
r=n%10;
rev=rev*10+r ;
printf("%d", & rev);
n=q;
r=n%10;
rev=rev*10+r;
printf("%d",rev);
getch();
}
No comments
Post a Comment