谁能帮我看看这个大难题
#include<iostream.h>#include<math.h>
//用来颠倒字符数组的函数
void reveser(char a[],int content)
{
for(int i=0;i<content;i++)
cin>>a[i];
for(i=0;i<content;i++)
cout<<a[i]<<" ";
cout<<"\n";
for(i=2;i>=0;i--)
cout<<a[i]<<" ";
cout<<"\n";
}
//用来颠倒一个三位数字的函数(怎样能让这个函数对输入用户没有限制,用户可以输入任意一个整数,并倒置输出)
void reveser(int number)
{
int ge,shi,bai,qian,wan;
wan=(number/10000);
qian=(number%10000)/1000;
bai=(number%1000)/100;
shi=(number%100)/10;
ge=number%10;
cout<<ge<<shi<<bai<<qian<<wan<<"\n";
}
void main()
{
int n;
cout<<"please input number words:";
char a[3];
reveser(a,3);
cout<<"please a number:";
cin>>n;
reveser(n);
}