#include<stdio.h>
int main(){
int num,r,reverse=0;
printf("Enter any number: ");
scanf("%d",&num);
for(;num!=0;num=num/10){
r=num%10;
reverse=reverse*10+r;
}
printf("Reversed of number: %d",reverse);
return 0;
}
Гаралт:
Enter any number: 123
Reversed of number: 321
No comments:
Post a Comment
http://groups.google.com/group/teacher_it_mongolia