程序代码:
#include<stdio.h> #include<string.h> int main(void) { char n[20]; int i; char c[10][6]={"zero","one","two","three","foue","five","six","seven","eight","nine"}; gets(n); for(i=0;i<strlen(n);i++) { if(n[i]>='0'&&n[i]<='9') printf(" %s",c[n[i]-48]); else printf(" %c",n[i]); } return 0; getch(); }