#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int s,i,j;
long int m=0;
cout<<"please enter the number"<<'\n';
cin>>s;
while(s>99999||s<0)
{
cout<<"data error,enter again";
cin>>s;
}
cout<<"各位数字分别是:";
for (i=1;(i<=5)&&((s%10)!=0);i++)
{
j=s%10;
cout<<j<<",";
s=s/10;
m=j+10*m;//逆序
}
// if((s/10)==0) cout<<s;
cout<<"逆序数是:"<<m<<'\n'<<"位数是:"<<(--i)<<endl;