[C/C++] 1002 写出这个数 (20)(20 分)

[C/C++] 1002 写出这个数 (20)(20 分)_第1张图片

 

 

#include 
#include
int main()
{   
    char a[100];
    char ref[10][5] ={"ling","yi","er","san","si","wu","liu","qi","ba","jiu"};
    scanf("%s",a);
    int len = strlen(a);
    int sum = 0;
    for(int i = 0;i=0;i--) {
        printf("%s",ref[s[i]-'0']);
        if(i>0) printf(" ");
    }

    return 0;
 } 

 

你可能感兴趣的:(编程题)