#include<iostream> #include<string> using namespace std; void main() { int i,j; int num1,num2; int c[10]; string a[10]= {"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"}; string b[9]={"圆","拾","佰","仟","万","拾","佰","仟","亿"}; cin>>num1; if(num1>1000000000){cout<<"输入过大"<<endl;exit(0);} for(i=0;num1/10;i++) { num2=num1%10; c[i]=num2; num1=num1/10; } c[i]=num1; for(j=i;j>=0;j--) if(j%4==0){ if(c[j]!=0){cout<<a[c[j]]<<b[j];} else cout<<b[j]; } else if(c[j]==0&&c[j-1]!=0) {cout<<a[0];} else if(c[j]!=0) {cout<<a[c[j]]<<b[j];} cout<<endl; }