设计一个c++程序,输入一个4位数,将其反序输出.例如1234,输出4321.

问题描述:

设计一个c++程序,输入一个4位数,将其反序输出.例如1234,输出4321.
1个回答 分类:综合 2014-12-15

问题解答:

我来补答
#include
using namespace std;
int reve_int(int n){
int t=0;
while(n){
t*=10;
t+=n%10;
n/=10;
}
return t;
}
void main(){
int n;
cin>>n;
cout
 
 
展开全文阅读
剩余:2000
也许感兴趣的知识