if语句出现错误!
#include <iostream>using namespace std;
void main()
{
int n,a,b,c,d,e;
cout<<"整数n=";
cin>>n;
a=n/10000;
b=(n-a*10000)/1000;
c=(n-a*10000-b*1000)/100;
d=(n-a*10000-b*1000-c*100)/10;
e=(n-a*10000-b*1000-c*100-d*10);
cout<<"n的逆序数为"<<e<<d<<c<<b<<a<<endl;
if(a!=0)
cout<<"n为5位数";
else if(b!=0)
cout<<"n为4位数";
else if(c!=0)
cout<<"n为3位数";
else if(d!=0)
cout<<"n为2位数";
else if(e!=0)
cout<<"n为1位数";
else
cout<<"error!"
}