#include"stdio.h"
int main()
{
int count=0,sum=0,t=0,count1=0;
char c;
while((c=getchar())!=’\n’){
// putchar©;
// printf("\n");
t=c-‘0’;
sum+=t;
count++;
}
// while(count!=0){
// }
int sum1=sum,sum2=sum,t2=0;
while(sum1!=0) {
sum1=sum1/10;
count1++;
}
int t1[count1];
for(int i=0;i<count1;i++){
t1[i]=sum2%10;
sum2=sum2/10;
}
// printf("%d %d %d\n",sum,count,count1);
for(int i=count1-1;i>0;i–){
switch(t1[i]){
case 1:printf("yi ");continue;
case 2:printf("er ");continue;
case 3:printf("san ");continue;
case 4:printf("si ");continue;
case 5:printf("wu ");continue;
case 6:printf("liu ");continue;
case 7:printf("qi ");continue;
case 8:printf("ba ");continue;
case 9:printf("jiu ");continue;
case 0:printf("ling ");continue;
};
}
switch(t1[0]){
case 1:printf(“yi”);break;
case 2:printf(“er”);break;
case 3:printf(“san”);break;
case 4:printf(“si”);break;
case 5:printf(“wu”);break;
case 6:printf(“liu”);break;
case 7:printf(“qi”);break;
case 8:printf(“ba”);break;
case 9:printf(“jiu”);break;
case 0:printf(“ling”);break;
};
return 0;
}
PATb1002
最新推荐文章于 2022-03-31 12:08:15 发布