final commit

master
段巧 6 years ago
parent 09248e3d5d
commit ee57f9a6c7

@ -10,7 +10,7 @@ int num2;
int trytimes; int trytimes;
}specific; }specific;
specific informat[10]; specific informat[10];
int changesi(int p) void changesi(int p)
{ {
if(p==0) if(p==0)
printf("+"); printf("+");
@ -60,6 +60,11 @@ int main()
{ {
srand(time(NULL)); srand(time(NULL));
printf("----------pupil exercise system----------\n"); printf("----------pupil exercise system----------\n");
printf("\t\t\t*******************************************************\n");
printf("\t\t\t* 此次测试的题目有10道 *\n");
printf("\t\t\t* 题目类型为两位数的加减 *\n");
printf("\t\t\t* 每题10分总分为100分。 *\n");
printf("\t\t\t*******************************************************\n");
int t=1,cnt=0,sum=0,a,b,c,ans; int t=1,cnt=0,sum=0,a,b,c,ans;
while(t<=10) while(t<=10)
{ {
@ -122,13 +127,11 @@ printf("--------------------\n");
} }
show_rank(sum); show_rank(sum);
printf("\n\n"); printf("\n\n");
char k;
int i; int i;
for(i=1;i<=10;i++) for(i=1;i<=10;i++)
{ {
printf("第%d题:%d",i,informat[i].num1); printf("第%d题:%d",i,informat[i].num1);
changesi(informat[i].jiajian);
k=changesi(informat[i].jiajian);
printf("%d=",informat[i].num2); printf("%d=",informat[i].num2);
if(informat[i].jiajian==0) if(informat[i].jiajian==0)
printf("%d\n",informat[i].num1+informat[i].num2); printf("%d\n",informat[i].num1+informat[i].num2);
@ -141,6 +144,3 @@ p=sum/10.0;
printf("你的正确率是:%.2f%%\n",p*10); printf("你的正确率是:%.2f%%\n",p*10);
return 0; return 0;
} }
Loading…
Cancel
Save