|
|
|
|
#include<stdio.h>
|
|
|
|
|
#include<stdlib.h> //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int main() //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{int a,b,c,i=0,j=0,num=0,k; //j<><6A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
rule();
|
|
|
|
|
while(1)
|
|
|
|
|
{ a=rand()%50;
|
|
|
|
|
b=rand()%50;
|
|
|
|
|
c=rand();
|
|
|
|
|
if(a<b)
|
|
|
|
|
{ k=a;
|
|
|
|
|
a=b;
|
|
|
|
|
b=k;
|
|
|
|
|
}
|
|
|
|
|
if((a+b)>0&&(a+b)<50)
|
|
|
|
|
{ num++;
|
|
|
|
|
printf("NO.%d ",num);
|
|
|
|
|
j=j+exam(a,b,c);
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
if(i>=10)
|
|
|
|
|
{ great(j);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printf("==================\n");
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
int rule() //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{ printf("===============================\n");
|
|
|
|
|
printf("<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>10<EFBFBD><EFBFBD><EFBFBD>⣬ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᡣ\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD>һ<EFBFBD>δ<EFBFBD><EFBFBD>Ե<EFBFBD>10<EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("<EFBFBD>ڶ<EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD>Ե<EFBFBD>7<EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD>Ե<EFBFBD>5<EFBFBD>֣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD>.\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뿪ʼ<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD><EFBFBD>!!!\n");
|
|
|
|
|
printf("================================\n");
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
int great(int n) //<2F><><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD><C9BC>ȼ<EFBFBD>
|
|
|
|
|
{ printf("<EFBFBD><EFBFBD><EFBFBD>ijɼ<EFBFBD><EFBFBD><EFBFBD>%d<><64>\n",n);
|
|
|
|
|
if(n>90)
|
|
|
|
|
printf("SMATE\n");
|
|
|
|
|
else if(n>=80&&n<=90)
|
|
|
|
|
printf("GOOD\n");
|
|
|
|
|
else if(n>=70&&n<80)
|
|
|
|
|
printf("OK\n");
|
|
|
|
|
else if(n>=60&&n<70)
|
|
|
|
|
printf("PASS\n");
|
|
|
|
|
else
|
|
|
|
|
printf("TRY AGAIN\n");
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
int exam(int a,int b,int c) //<2F><><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD>
|
|
|
|
|
{ int m,n,j=0,i;
|
|
|
|
|
if(c%2==0)
|
|
|
|
|
{ n=a-b;
|
|
|
|
|
printf("%d-%d=",a,b);
|
|
|
|
|
for(i=0;i<3;i++)
|
|
|
|
|
{ scanf("%d",&m);
|
|
|
|
|
if(n==m)
|
|
|
|
|
{ if(i==0)
|
|
|
|
|
j=10;
|
|
|
|
|
else if(i==1)
|
|
|
|
|
j=7;
|
|
|
|
|
else
|
|
|
|
|
j=5;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{ printf(" <20>𰸴<EFBFBD><F0B0B8B4><EFBFBD>\n");
|
|
|
|
|
if(i<2)
|
|
|
|
|
printf(" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
|
|
|
|
if(i==2)
|
|
|
|
|
printf(" <20><>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%d\n",n);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(c%2!=0)
|
|
|
|
|
{ n=a+b;
|
|
|
|
|
printf("%d+%d=",a,b);
|
|
|
|
|
for(i=0;i<3;i++)
|
|
|
|
|
{ scanf("%d",&m);
|
|
|
|
|
if(m==n)
|
|
|
|
|
{ if(i==0)
|
|
|
|
|
j=10;
|
|
|
|
|
else if(i==1)
|
|
|
|
|
j=7;
|
|
|
|
|
else
|
|
|
|
|
j=5;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{ printf(" <20>𰸴<EFBFBD><F0B0B8B4><EFBFBD>\n");
|
|
|
|
|
if(i<2)
|
|
|
|
|
printf(" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
|
|
|
|
if(i==2)
|
|
|
|
|
printf(" <20><>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%d\n",n);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printf("__________________\n");
|
|
|
|
|
return j;
|
|
|
|
|
}
|