Code for PROGRAM USNG WHILE LOOP TO REVERSE THE DIGITS OF THE NUMBER NO IS - 12345 ANSWER IS 54321 in C Programming
#include <stdio.h>
#include <conio.h>
#include<math.h>
void main()
{
long n,j;
clrscr();
printf("Enter the No :- ");
scanf("%ld",&n);
printf("\n");
printf("Reverce of the number is....");
while(n>0)
{
j = n%10;
printf("%ld",j);
n /= 10;
}
getch();
}
/*
********
OUTPUT
********
Enter the No :- 23456
Reverce of the number is....65432
*/