给你一个三位正整数,输出相应读法的汉语拼音,每个音之间用一个空格间隔。菜鸟总是搞不出来...
#include <stdio.h>int main(int argc,char *argv[]){
int n,t,N,i=0;
char y[][4]={"\n","yi","er","san","si","wu","liu","qi","ba","jiu"};
scanf("%d",&N);
for(i=0;i<N;i++)
scanf("%d",&n);
{for(i=0;i<N;i++)
printf("%s bai",y[n/100]);
{if((t=n/10%10) && n%10)
printf(" %s shi %s ",y[t],y[n%10]);
if(t==0 && n%10)
printf(" ling %s ",y[n%10]);
printf("\n");
}
}
}