帮忙看看这个是什么问题
程序代码:
#include<stdio.h> void main() { int i,a; int m=0; printf("请输入数字:\n"); scanf("%d",&i); a=i; while(i<0||i>99999) { printf("输入的数字有误,请在重新输入:\n"); scanf("%d",&i); } while(i) { m++; i=i/10; } printf("这是%d位数\n",m); void Each_digit(m); //错误显示的是这一行 } void Each_digit() { int a,x,y,z,k,l,m; switch(m) { case 1: printf("%d\n",a);break; case 2: x = a/10, y = a%10; printf("十位:%d 个位:%d\n",x,y);break; case 3: x = a/100, y = a/10%10, z = a%10; printf("百位:%d 十位:%d 个位:%d\n",x,y,z);break; case 4: x = a/1000, y = a/100%10, z = a/10%10, k = a%10; printf("千位:%d 百位:%d 十位:%d 个位:%d\n",x,y,z,k);break; case 5: x=a/10000,y =a/1000%10, z=a/100%10, k = a/10%10, l = a%10; printf("万位:%d 千位:%d 百位:%d 十位:%d 个位:%d\n",x,y,z,k,l);break; } }
:\C++6.0_Win7_XP85\程序\suiyi .c(21) : error C2143: syntax error : missing ';' before 'type'
执行 cl.exe 时出错.
[此贴子已经被作者于2016-9-27 15:35编辑过]