You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
1.5 KiB

6 years ago
#include<stdio.h>
#include<time.h>
#include<stdlib.h>
int main(){
int choice;
printf("<EFBFBD><EFBFBD>ӭʹ<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ\n");
char name[100];
char xuehao[110];
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD>ŵ<EFBFBD><C5B5>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<><30><EFBFBD>˳<EFBFBD>\n") ;
//ģ<><C4A3><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ϵͳʱ<CDB3>Ŀ<EFBFBD><C4BF>Խ<EFBFBD><D4BD><EFBFBD>
scanf("%d",&choice);
switch(choice)
{
case 1:printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>\n");
scanf("%s",name);
scanf("%s",xuehao);
//ʹ<><CAB9><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>
int a,b,c,i,j,score[10],trueValue,sum=0;
srand(time(NULL));
for( i=0;i<10;i++){
for(a=rand()%51,b=rand()%51;a+b>50 || a+b<0 || a-b>50 || a-b<0; a=rand()%51,b=rand()%51)
c=rand()%2;
//ʹ<><CAB9>rang<6E><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[0<><30>50]<5D><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>
//c<><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>1<EFBFBD><31><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>Ӧ<EFBFBD>ӷ<EFBFBD><D3B7>ͼ<EFBFBD><CDBC><EFBFBD>
for( j=0;j<3;j++){
if(c==1){
printf("%d:%d+%d=",i+1,a,b);
trueValue=a+b;
//<2F>ӷ<EFBFBD><D3B7><EFBFBD>ʽ
scanf("%d",&score[i]);
if(score[i]!=trueValue){
printf("<EFBFBD>𰸴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n");
score[i]=0;
}
else{
if(j==0){
score[i]=10;
}
else if(j==1){
score[i]=7;
}
else{
score[i]=5;
}
break;
}
}
//<2F>ӷ<EFBFBD><D3B7>ļƷַ<C6B7>ʽ
else{
printf("%d:%d-%d=",i+1,a,b);
trueValue=a-b;
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD>ʽ
scanf("%d",&score[i]);
if(score[i]!=trueValue){
printf("<EFBFBD>𰸴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n");
score[i]=0;
}
else{
if(j==0){
score[i]=10;
}
else if(j==1){
score[i]=7;
}
else{
score[i]=5;
}
break;
}
}
}
if(score[i]==0){
printf("<EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD>%d\n",trueValue);
}
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļƷַ<C6B7>ʽ
sum=sum+score[i];
}
printf("<EFBFBD><EFBFBD><EFBFBD>ijɼ<EFBFBD><EFBFBD><EFBFBD>:%d\n",sum);
if(sum>90){
printf("SMART.\n");
}
else if(sum>=80){
printf("GOOD.\n");
}
else if(sum>=70){
printf("OK.\n");
}
else if(sum>=60){
printf("PASS.\n");
}
else{
printf("TRYAGAIN\n");
}
break;
case 0:break;}
return 0;
}