KodeGod.com

029. Write a Program to accept a number and print the number in reverse order. E.g. if 1324 is the number then the output will be 4231 in C language

#include<stdio.h>
#include<conio.h>  
main()
{
  int rem,n;
  clrscr();
  printf("Enter n : ");
  scanf("%d",&n);
  while(n>0)
  {
	   rem=n%10;
	   printf("%d",rem);
	   n=n/10;
  }
  getch();
}