可以,你需要把考试题目和标准答案拿来……
可以先给你一段做提示,按照这个做好了(单选,4题,每题25分)
#include<stdio.h>
int main()
{
int score=0;
int i;
char Ans[5]="BACA";
char Sel[5];
char s;
printf("************************\n");
printf("******English Test******\n");
printf("************************\n\n");
printf("1. What are you doing?\n");
printf("A. I am Lilei\t B. I am reading a book\t C. I read a book\t D. I have a book\n");
scanf("%c",&Sel[0]);
s=getchar();
printf("2. How are you?\n");
printf("A. I am Fine\t B. I have no time\t C. You are welcome\t D. Nice to meet you\n");
scanf("%c",&Sel[1]);
s=getchar();
printf("3. How do you spell it?\n");
printf("A. Yes, I am\t B. It is Monday\t C. M-O-O-N,Moon\t D. I can swim\n");
scanf("%c",&Sel[2]);
s=getchar();
printf("4. Nice to meet you\n");
printf("A. Nice to meet you,too\t B. Good morning\t C. I am Han\t. D. Yes it is\n");
scanf("%c",&Sel[3]);
s=getchar();
for(i=0;i<4;i++)
if(Sel[i]==Ans[i]) score+=25;
printf("Your Score is:%d",score);
}
就是爸题目和选项打出来,然后用户分别用键盘输入他的选择,然后把他的选择Sel【】和标准答案Ans【】做比较,每答对一题,score的分数就加上25……
温馨提示:答案为网友推荐,仅供参考