Sunday 21 January 2018

Program for Reverse Number


Program for Reverse Number
#include<stdio.h>
#include<conio.h>
main()
{
int a,r,rev=0;
clrscr();
printf("enter the value of a");
scanf("%d",&a);
while(a!=0)
{
r=a%10;
rev=rev*10+r;
a=a/10;
}
printf("The reverse no of the given no is=%d",rev);
getch();

}

0 comments:

Post a Comment