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();
}

4 thoughts on “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

Leave a Reply

Your email address will not be published. Required fields are marked *