c语言中这是什么错误啊
#include<stdio.h>int main()
{
int a,b,c,d,e,x;
printf("请输入一个10000以内的数");
scanf("%d",&a);
if(1000<=a&&a<=9999)
{
x=1;
printf("%d",x);
}
else if(100<=a&&a<=999)
{
x=2;
printf("%d",x);
}
else if(10<=a&&a<=99)
{
x=3;
printf("%d",x);
}
else if(1<=a&&a<=9)
{
x=4;
printf("%d",x);
}
switch(x)
{
case 1:b=int(a/1000);break;
case 2:c=int((a-b*1000)/100);break;
case 3:d=int((a-b*1000-c*100)/10);break;
case 4:e=int((a-b*1000-c*100-d*10)/10);break;
}
printf("%d,%d,%d,%d",b,c,d,e);
return 0;
}
然后就是这样了Compiling...
1.c
E:\Microsoft Visual Studio\Common\MSDev98\Bin\1.c(29) : error C2059: syntax error : 'type'
E:\Microsoft Visual Studio\Common\MSDev98\Bin\1.c(30) : error C2059: syntax error : 'type'
E:\Microsoft Visual Studio\Common\MSDev98\Bin\1.c(31) : error C2059: syntax error : 'type'
E:\Microsoft Visual Studio\Common\MSDev98\Bin\1.c(32) : error C2059: syntax error : 'type'
执行 cl.exe 时出错.