wintc说我的程序参数中有错误字符,检查好久不知怎么了?
这是一个给小学生出加法题的问题/* Note:Your choice is C IDE */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void main()
{
int a,b,c,d,e,i=1,j=1;
for(;i<=3;i++)
{
srand(time(NULL));
a=(rand()%100+1)/10+1;
b=(rand()%100+1)/10+1;
loop:e=(rand()%100+1)/10+1;
if(e<=4)
{if(e==1)
{c=a+b;
printf("please account %d+%d=?\n",a,b);}
else if(e==2)
{c=a-b;printf("please account %d-%d=?\n",a,b);}
else if(e==3)
{c=a*b;printf("please account %d*%d=?\n",a,b);}
else
{c=a/b;printf("please account %d/%d=?\n",a,b);}
}
else
goto loop;
scanf("%d",&d);
if(d==c)
{printf("right\n");j++;}
}
printf("test over.\n");
printf("score=%d\n",(j-1)*10);
printf("the wrong number is %d",4-j);
}