#include<stdio.h>
#include<string.h>
void main()
{
int i,sum=0,t;
char a[105],b[5],pinying[][10]={"ling","yi","er","san","si","wu","liu","qi","ba","jiu"};
gets(a);
for(i=0;i<strlen(a);i++){
sum=sum+a[i]-'0';
}
for(i=0;sum>0;i++){
b[i]=sum%10;
sum=sum/10;
}
for(--i;i>0;i--){
printf("%s ",pinying[b[i]]);
}
printf("%s",pinying[b[i]]);
printf("\n");
}
PTA1002 写出这个数 (20 分)
最新推荐文章于 2022-03-24 13:05:34 发布