代码拉取完成,页面将自动刷新
#include <stdio.h>
#include <math.h>
int main(){
long Shuru;
int sum=0;
int Yushu=0;
int i=10;
scanf("%d",&Shuru);
while(Shuru!=0){
Yushu=Shuru%i;
Shuru=Shuru/10;
sum=Yushu+sum;
}
//45 sum
int number=0;
int sum0;
sum0=sum;
while(sum0!=0){ //õsumλ
sum0=sum0/10;
number++;
}
int out;
int first;
first=number;
while (number!=0) {
out=sum/pow(10,number-1);
out=out%10;
if(first==number){
switch(out){
case 0:
printf("ling");
break;
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;
}
number--;
}else{
switch(out){
case 0:
printf(" ling");
break;
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;
}
number--;
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。