basic programming for beginners
i make programming easy....!
Monday, 21 May 2012
PROGRAM TO INPUT A NUMBER AND O/P NUMBER BY REVERSING THE DIGITS
#include<stdio.h>
#include<conio.h>
void main(){
int num,rem;
clrscr();
printf("enter the number");
scanf("%d",&num);
while(num>0){
rem=num%10;
num=num/10;
printf("%d",rem);
}
}
Output:-
enter the number1234
4321
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment