|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
|
|
int sjfu()
|
|
|
|
|
{ srand( (unsigned)time( NULL ));
|
|
|
|
|
return rand()%2;
|
|
|
|
|
}
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
char a[]={'+','-'};
|
|
|
|
|
int b,c,d,t,i,j,f,su=0;
|
|
|
|
|
int daan,fenshu=0;
|
|
|
|
|
printf("--------------------------------------------------------------\n");
|
|
|
|
|
printf("\n\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>10<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD>\n\t<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\n");
|
|
|
|
|
printf("--------------------------------------------------------------\n\n");
|
|
|
|
|
for(i=0;i<10;i++)
|
|
|
|
|
{
|
|
|
|
|
srand( (unsigned)time( NULL ));
|
|
|
|
|
b=rand()%51;
|
|
|
|
|
c=rand()%51;
|
|
|
|
|
d=sjfu();
|
|
|
|
|
if(b<c)
|
|
|
|
|
{ t=b;b=c;c=t;}
|
|
|
|
|
|
|
|
|
|
switch(a[d])
|
|
|
|
|
{
|
|
|
|
|
case '+':{daan=b+c;break;}
|
|
|
|
|
case '-':{daan=b-c;break;}
|
|
|
|
|
} //<2F>ó<EFBFBD><C3B3><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
if(daan>50)
|
|
|
|
|
{ i-=1;continue;} //<2F>ж<EFBFBD><D0B6><EFBFBD>ʽ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>
|
|
|
|
|
su=i;
|
|
|
|
|
printf("<EFBFBD><EFBFBD>%d<><64>\n",su+1);
|
|
|
|
|
printf("\t%d%c%d=?\n\n",b,a[d],c); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(j=0;j<3;j++)
|
|
|
|
|
{
|
|
|
|
|
scanf("%d",&f);
|
|
|
|
|
if(f==daan)
|
|
|
|
|
break;
|
|
|
|
|
else
|
|
|
|
|
printf("<EFBFBD>𰸲<EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뿴\n");
|
|
|
|
|
} //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>𰸣<EFBFBD><F0B0B8A3><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>ᣩ
|
|
|
|
|
|
|
|
|
|
switch(j)
|
|
|
|
|
{
|
|
|
|
|
case 0:{fenshu+=10;break;}
|
|
|
|
|
case 1:{fenshu+=7;break;}
|
|
|
|
|
case 2:{fenshu+=5;break;}
|
|
|
|
|
case 3:{fenshu+=0;printf("\n\t<EFBFBD>ܿ<EFBFBD>ϧ\n\t<EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %d\n",daan);break;}
|
|
|
|
|
} //<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>𰸣<EFBFBD><F0B0B8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD>
|
|
|
|
|
printf("\n--------------------------------------------------------------\n\n");
|
|
|
|
|
}
|
|
|
|
|
if(fenshu>=90)
|
|
|
|
|
printf("SMART\n");
|
|
|
|
|
else if(fenshu<90&&fenshu>=80)
|
|
|
|
|
printf("GOOD\n");
|
|
|
|
|
else if(fenshu<80&&fenshu>=70)
|
|
|
|
|
printf("OK\n");
|
|
|
|
|
else if(fenshu<70&&fenshu>=60)
|
|
|
|
|
printf("PASS\n");
|
|
|
|
|
else
|
|
|
|
|
printf("TRY AGAIN\n"); //<2F>жϵȼ<CFB5>
|
|
|
|
|
return 0;
|
|
|
|
|
}
|