#include<stdio.h>
#include<conio.h>
void main()
{
int no,rem,rev=0;
clrscr();
printf("Enter a no:");
scanf("%d",&no);
while(no>0)
{
rem=no%10;
rev=(rem*10)+rev;
no=no/10;
}
printf("Reversed number =%d",rev);
getch();
}
Showing posts with label Reverse a number. Show all posts
Showing posts with label Reverse a number. Show all posts
Subscribe to:
Posts (Atom)
Related Post
Array:
String functions:
General (Loops-for/while)