作者在 2009-07-01 02:06:21 发布以下内容
输入一个数 并倒过来输出
#include<stdio.h>
#include<math.h>
main(){
int x,y;
printf("put an number:\n");
scanf("%d",&x);
do{
y=x%10;
printf("%d",y);
x=(x-y)/10;
}while(x!=0);
}
#include<math.h>
main(){
int x,y;
printf("put an number:\n");
scanf("%d",&x);
do{
y=x%10;
printf("%d",y);
x=(x-y)/10;
}while(x!=0);
}