|
|
|
|
#include<stdio.h>
|
|
|
|
|
#include<time.h>
|
|
|
|
|
#include<stdlib.h>
|
|
|
|
|
|
|
|
|
|
int question( int i)
|
|
|
|
|
{
|
|
|
|
|
int a,b,j,m;
|
|
|
|
|
|
|
|
|
|
for( i = i;i<100;i++ )
|
|
|
|
|
{
|
|
|
|
|
loop:
|
|
|
|
|
{
|
|
|
|
|
a=rand()%51;
|
|
|
|
|
b=rand()%51;//rand()%100<30><30>ʾȡ50<35><30><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
j=rand()%2;//j<><6A>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
if(j==0)
|
|
|
|
|
{
|
|
|
|
|
m=a+b;
|
|
|
|
|
if(m<=50)
|
|
|
|
|
{
|
|
|
|
|
printf("%d+%d=\n",a,b);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
goto loop;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m=a-b;
|
|
|
|
|
if(m<=50&&m>=0)
|
|
|
|
|
{
|
|
|
|
|
printf("%d-%d=\n",a,b);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
goto loop;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return m;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int modelanswer=0;
|
|
|
|
|
int studentanswer=0;
|
|
|
|
|
char str[20];
|
|
|
|
|
int grade=0;
|
|
|
|
|
int n;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
|
printf("============================================================\n");
|
|
|
|
|
printf("====================50<35><30><EFBFBD>ڼӼ<DABC><D3BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ====================\n");
|
|
|
|
|
printf("============================================================\n");
|
|
|
|
|
printf("\n");
|
|
|
|
|
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD>\n");
|
|
|
|
|
scanf("%s",str);
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѽ<EFBFBD><EFBFBD>%sС<73><D0A1><EFBFBD>ѣ<EFBFBD><D1A3><EFBFBD>ӭ<EFBFBD><D3AD><EFBFBD><EFBFBD>50<35><30><EFBFBD>ڼӼ<DABC><D3BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3>\n",str);
|
|
|
|
|
printf("ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᣬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>Ӹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD>𰸡<EFBFBD>\n");
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijɼ<EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\n");
|
|
|
|
|
printf("======================Ҫע<D2AA><D7A2>ϸ<EFBFBD><CFB8>Ŷ~=========================\n\n");
|
|
|
|
|
|
|
|
|
|
for(n=1;n<11;n++)
|
|
|
|
|
{
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD>%d<><64><EFBFBD>⣺\n",n);
|
|
|
|
|
modelanswer=question(n);
|
|
|
|
|
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>𰸣<EFBFBD>");
|
|
|
|
|
scanf("%d",&studentanswer);
|
|
|
|
|
if(studentanswer==modelanswer)
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
grade=grade+10;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD>˼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㻹<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>ᡣ\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>𰸣<EFBFBD>");
|
|
|
|
|
scanf("%d",&studentanswer);
|
|
|
|
|
|
|
|
|
|
if(studentanswer==modelanswer)
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
grade=grade+7;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD>˼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㻹<EFBFBD><EFBFBD>һ<EFBFBD>λ<EFBFBD><EFBFBD>ᡣ\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>𰸣<EFBFBD>");
|
|
|
|
|
scanf("%d",&studentanswer);
|
|
|
|
|
|
|
|
|
|
if(studentanswer==modelanswer)
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
grade=grade+5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD>%d\n",modelanswer);
|
|
|
|
|
grade=grade+0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(grade>=90)
|
|
|
|
|
{
|
|
|
|
|
printf("\nSMART!\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(grade<90&&grade>=80)
|
|
|
|
|
{
|
|
|
|
|
printf("\nGOOD!\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(grade<80&&grade>=70)
|
|
|
|
|
{
|
|
|
|
|
printf("\nOK.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(grade<70&&grade>=60)
|
|
|
|
|
{
|
|
|
|
|
printf("\nPASS.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(grade<60)
|
|
|
|
|
{
|
|
|
|
|
printf("\nTRY AGAIN.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD>ijɼ<EFBFBD><EFBFBD>ǣ<EFBFBD>%d\n",grade);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|