|
|
@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
void InputTitle(int N) //输入N道试题
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for(i=0;i<N;i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("请输入第%d道题目,题干和选项\n",i+1);
|
|
|
|
|
|
|
|
printf("请输入题目:");
|
|
|
|
|
|
|
|
gets(Testquestions[i].subject);
|
|
|
|
|
|
|
|
printf("请输入选项A:");
|
|
|
|
|
|
|
|
gets(Testquestions[i].option1);
|
|
|
|
|
|
|
|
printf("请输入选项B:");
|
|
|
|
|
|
|
|
gets(Testquestions[i].option2);
|
|
|
|
|
|
|
|
printf("请输入选项C:");
|
|
|
|
|
|
|
|
gets(Testquestions[i].option3);
|
|
|
|
|
|
|
|
printf("请输入选项D:");
|
|
|
|
|
|
|
|
gets(Testquestions[i].option4);
|
|
|
|
|
|
|
|
printf("请输入答案:");
|
|
|
|
|
|
|
|
scanf("%c",&Testquestions[i].result);
|
|
|
|
|
|
|
|
getchar();
|
|
|
|
|
|
|
|
system("cls"); //清屏
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Status InsertNode(int N) //插入试题内容
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(N>MAX)
|
|
|
|
|
|
|
|
return ERROR;
|
|
|
|
|
|
|
|
printf("请输入所要插入的题目,题干和选项:\n");
|
|
|
|
|
|
|
|
printf("请输入题目:");
|
|
|
|
|
|
|
|
gets(Testquestions[N].subject);
|
|
|
|
|
|
|
|
printf("请输入选项A:");
|
|
|
|
|
|
|
|
gets(Testquestions[N].option1);
|
|
|
|
|
|
|
|
printf("请输入选项B:");
|
|
|
|
|
|
|
|
gets(Testquestions[N].option2);
|
|
|
|
|
|
|
|
printf("请输入选项C:");
|
|
|
|
|
|
|
|
gets(Testquestions[N].option3);
|
|
|
|
|
|
|
|
printf("请输入选项D:");
|
|
|
|
|
|
|
|
gets(Testquestions[N].option4);
|
|
|
|
|
|
|
|
printf("请输入答案:");
|
|
|
|
|
|
|
|
scanf("%c",&Testquestions[N].result);
|
|
|
|
|
|
|
|
getchar();
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
}
|