#include<stdio.h>//header file
#include<conio.h>//header file
void main() //starting of the main() function
{
int j=0,c,p,n; //declaration of the variables
clrscr();
printf("program that reverses a given integer no.");
printf("\n\n\n\t\t------------INPUT-------------");
printf("\n\nenter the no. to be reversed");//taking input from the user
scanf("%d",&n);
p=n;
while(p!=0)
{
c=p%10;
j=j*10+c;
p=p/10;
}
printf("\n\n\n\t\t------------OUTPUT------------");
printf("\n\nthe reversed no. of %d is=%d",n,j);//printing output
getch();
}