#include<iostream.h> void main() { int num,a,b,c,d; cout<<"请输入一个四位数:"<<endl; cin>>num; a=num/1000; b=(num-1000*a)/100; c=(num-1000*a-100*b)/10; d=(num-1000*a-100*b-10*c); cout<<" 逆序输出为:"<<d<<c<<b<<a<<endl; }