a<<" "<<"b."<b<<" "<<"c."<c<<" "<<"d."<d<next;Р }Р p=head;Р cout<<"请输入答案:";Р cin>>s;Р fuc[i]=s; //将你所输入的答案s送到全局数组中Р }Р}Рvoid mark() //评分Р{Р int x=0;in" /> a<<" "<<"b."<b<<" "<<"c."<c<<" "<<"d."<d<next;Р }Р p=head;Р cout<<"请输入答案:";Р cin>>s;Р fuc[i]=s; //将你所输入的答案s送到全局数组中Р }Р}Рvoid mark() //评分Р{Р int x=0;in" />

全文预览

单项选择题考试标准化系统

上传者:梦&殇 |  格式:doc  |  页数:14 |  大小:195KB

文档介绍
out<<"a."<<p->a<<" "<<"b."<<p->b<<" "<<"c."<<p->c<<" "<<"d."<<p->d<<endl;Р break;Р }Р p=p->next;Р }Р p=head;Р cout<<"请输入答案:";Р cin>>s;Р fuc[i]=s; //将你所输入的答案s送到全局数组中Р }Р}Рvoid mark() //评分Р{Р int x=0;int y=0;Р test *p,*head=load();Р?FILE *fp=fopen("test.txt","rb");p=head;Р for(int i=0;i<m;i++)Р {Р no=rec[i];Р s=fuc[i];Р while(p!=NULL)Р {Р if(p->k==no)Р {Р cout<<i+1<<". "<<p->ask<<endl<<"a."<<p->a<<" "<<"b."<<p->b<<" "<<"c."<<p->c<<" "<<"d."<<p->d<<endl;Р if(s==p->rightanswer) //判断输入的答案和试题库中的正确答案是否一致Р {Р cout<<"答案正确"<<endl;Р x++; //正确的题目数Р }Р else {Р cout <<"答案错误"<<endl;Р y++;} //错误的题目数Р break;Р }Р p=p->next;Р }Р p=head;Р }Р cout<<"答对的题目数:"<<x<<endl;Р cout<<"答错的题目数:"<<y<<endl;Р cout<<"总得分:"<<100*x/m<<endl; //总得分Р system("pause");Р}Рstruct test *delet() //删除Р{ struct test *head=load();Р?int y;

收藏

分享

举报
下载此文档