求教高手!(从键盘输入任意数,然后使其逆序输出)
来源:百度知道 编辑:UC知道 时间:2024/06/28 05:45:07
用VC++编写的C程序~~
我是用TC写的,因为机器上没有VC,呵呵,不过思路是一样的。
#include<stdio.h>
void main()
{ long int n;
int c;
printf("Input:\n");
scanf("%ld",&n);
while(n!=0)
{c=n%10;
n=n/10;
printf("%d",c);
}
getch();
}