user-0 提问: 求一个程序，输入一个整数，依次输出它的每位数的英文单词，（看到精华帖的问题，自己学着编的），

回复:
user: user-1
content: 修改版：参考一下吧！ #include <stdio.h>  void Switch(int j) { 	switch(j) 	{ 		case 0:printf("zero ");break; 		case 1:printf("one ");break; 		case 2:printf("two ");break; 		case 3:printf("three ");break; 		case 4:printf("four ");break; 		case 5:printf("five ");break; 		case 6:printf("six ");break; 		case 7:printf("seven ");break; 		case 8:printf("eight ");break; 		case 9:printf("nine ");break; 		default:printf("error!\n"); 	} }  int main() { 	int num,i=1,n=1,h,j; 	int temp; 	printf("please input the number:\n"); 	scanf("%d",&num); 	temp=num; 	while(temp>9) 	{ 		temp=temp/10; 		i++; 		n=n*10;	 	} 	 	for(h=0;h<i;h++) 	{ 		temp=num; 		j=(temp/n)%10; 		n=n/10; 		Switch(j); 	} 		  	 	return 0; }

user: user-1
content: #include <stdio.h>  void Switch(int j) { 	switch(j) 	{ 		case 1:printf("one");break; 		case 2:printf("two");break; 		case 3:printf("three");break; 		case 4:printf("four");break; 		case 5:printf("five");break; 		case 6:printf("six");break; 		case 7:printf("seven");break; 		case 8:printf("eight");break; 		case 9:printf("nine");break; 		default:printf("error!"); 	} }  int main() { 	int num,i=1,n=1,h,j; 	int temp; 	printf("please input the number:\n"); 	scanf("%d",&num); 	temp=num; 	while(temp>10) 	{ 		temp=temp/10; 		i++; 		n=n*10;	 	} 	 	for(h=0;h<i;h++) 	{ 		temp=num; 		j=(temp/n)%10; 		n=n/10; 		Switch(j); 	} 		  	 	return 0; }

user: user-2
content: #include <stdio.h> #include <stdlib.h>  #define  MAX_LEN    10  void reverse(int *bits, int len); int get_bits(int *bits, int num); int main() {     char *p[10] = {"zero", "one", "two", "three",         "four", "five", "six", "seven", "eight", "nine"};      long int num;     int cnt, bits[MAX_LEN], i;      printf("Please input a interger: ");     scanf("%ld", &num);      cnt = get_bits(bits, num);      printf("bits list are: \n");     for (i = 0; i < cnt; i++) {         printf("%s ", p[bits[i]]);     }     putchar(10);      /*     long n,m;     int i,j;     scanf("%ld",&n);     for(j=0;n>=0;j++)     {         m=n;         for(i=0;m>=10;i++)         {             m=m/10;         }         if(n>=10)         {             n=n-m*(pow(10,i));             printf("%s\n",p[m]);             if(n<pow(10,i-1)&&n>0)             {                 printf("%s\n",p[0]);             }         }         if(n<10&&n>=0)         {             printf("%s\n",p[n]);             break;         }     }     */     system("pause");     return 0; }  int get_bits(int *bits, int num) {     int i = 0;      if (num == 0) {         bits[i] = 0;         return 0;     }     if (num < 0)         num = abs(num);      while (num) {         bits[i++] = num % 10;         num /= 10;     }     reverse(bits, i);     return i; }  void reverse(int *bits, int len) {     int i, tmp;      for (i = 0; i < len/2; i++) {         tmp = bits[len-1-i];         bits[len-1-i] = bits[i];         bits[i] = tmp;     } }  作为一个参考吧～

user: user-0
content: 谢谢，自己在家学的，还没有深入，确实要多花功夫

user: user-3
content: 代码功能归根结底不是别人帮自己看或讲解或注释出来的；而是被自己静下心来花足够长的时间和精力亲自动手单步或设断点或对执行到某步获得的中间结果显示或写到日志文件中一步一步分析出来的。 提醒：再牛×的老师也无法代替学生自己领悟和上厕所！ 单步调试和设断点调试（VS IDE中编译连接通过以后，按F10或F11键单步执行，按Shift+F11退出当前函数；在某行按F9设断点后按F5执行停在该断点处。）是程序员必须掌握的技能之一。

user: user-4
content: char *p[10]={"zero","one","two","three","four","five","six","seven","eight","nine","ten"}; 数组大小为11

user: user-0
content: 引用 1 楼 user-4的回复:char *p[10]={"zero","one","two","three","four","five","six","seven","eight","nine","ten"}; 数组大小为11 这个问题挺多的，不止一处，现在还在更正摸索。