




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不帮就完 设计一个单项选择题标准化考试系统 可以进行试题保存 录入 抽取 答题及判卷等 功能 基本要求 1 文件保存试题库 每个试题包括题干 4 个备选答案 标准答案 2 试题录入 可随时增加试题到试题库中 3 试题抽取 每次从试题库中可以随机抽出 N 道题 N 由键盘输入 4 答题 用户可实现输入自己的答案 5 自动判卷 系统可根据用户答案与标准答案的对比实现判卷并给出成绩 其它要求 1 只能使用 C 语言 源程序要有适当的注释 使程序容易阅读 2 至少采用文本菜单界面 如果能采用图形菜单界面更好 帮帮啊 QQ 183004162 作者 tianmin1 2006 6 13 12 02 回复此发言 2 回复 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 呵呵 都来网上搜了 作者 58 244 28 2006 6 17 21 46 回复此发言 3 回复 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 要饭的真多 作者 61 172 82 2006 6 17 22 39 回复此发言 4 回复 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 include include include struct question char ask 200 选择题题目 char answer 4 80 选择题选项 int right 正确答案 struct question next int MenuChoice void struct question InsertList struct question fst const struct question ad struct question ListSeek struct question seek long len long max void GetQuestion struct question src void SaveFile const struct question ed FILE saf struct question LoadFile struct question td FILE laf int GetAnswer void void ExplainQuestion const struct question que int n main struct question start NULL temp long choice line 0 c FILE fp fopen kstm dat a start LoadFile start fp while choice MenuChoice 3 if choice 1 GetQuestion start InsertList start line 统计列表的长度 else if choice 2 c 600 while c 500 c line printf 请输入要回答的问题数量 scanf d ExplainQuestion start line SaveFile start fp 进行最后的工作 fclose fp return 0 ListSeek 函数确定一个读取答案的位置 len 代表要读取的答案数 max 代表列表的长度 struct question ListSeek struct question seek long len long max int i srand time NULL while i rand max len next 找到指定的位置 return seek 向列表中插入试题 struct question InsertList struct question fst const struct question ad struct question newPtr struct question malloc sizeof struct question if newPtr NULL exit 0 newPtr ad newPtr next fst return newPtr 获取问题 选项 以及正确答案 void GetQuestion struct question src int i 0 printf 请输入选择题题目 n scanf s src ask while i answer i src right GetAnswer 从文件中读取题目 将题目添加到列表中 struct question LoadFile struct question td FILE laf struct question temp while fread return td 将列表中的试题保存在文件中 void SaveFile const struct question ed FILE saf fclose saf if saf fopen kstm dat w NULL 以写的方式重新打开文件 return while ed fwrite ed 1 sizeof struct question saf ed ed next 得到选择题的答案 不保证是正确的答案 int GetAnswer void int c 0 必须进行初始化 避免出现偶然性的错误 fflush stdin while c D 确保输入的答案是 A B C D 中的一个 printf 请输入正确的答案 scanf c return c 回答问题 并统计答对题目数 显示得分 void ExplainQuestion const struct question que int n int i 0 t n char result 1001 p result for i 0 n que que next printf s nA s nB s nC s nD s n n que ask que answer 0 que answer 1 que answer 2 que answer 3 if p que right p 1 GetAnswer i p 2 p 0 printf n 13s 13s s n 标准答案 您的答案 评价 for p result p 0 p 2 printf 13c 13c s n p p 1 p p 1 正确 错误 printf n 您回答了 d 道题 答对 d 道题目 得分 2f n n t i float i t 100 00 选择菜单 int MenuChoice void int value printf 1 添加选择题 n2 回答选择题 n3 退出 n scanf d return value 但是这个程序运行后不能实现随即抽题 struct question ListSeek struct question seek long len long max int i srand time NULL while i rand max len next 找到指定的位置 return seek 作者 文问 007 2007 6 7 20 49 回复此发言 5 回复 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 如果不用统计列表 还有结构体中用指针 又怎么弄呢 作者 tingtingbaling 2007 6 13 14 47 回复此发言 6 回复 3 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 大家都有才学的时候 谁能保证一学就会 况且对大一来说有些情况下课程设计自己根 本没招的 我们都是抱着学习的态度来 怎么能说成要饭 作者 58 62 226 2007 6 18 16 08 回复此发言 7 回复 4 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 非常感谢 作者 58 62 226 2007 6 18 16 09 回复此发言 8 回复 4 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 太谢谢了真是太好了 我非常感谢啊 以后我一定好好学 要不真费事啊 作者 222 163 24 2007 7 2 10 57 回复此发言 9 单项选择题标准化考试系统 请问一下怎样使它实现随即抽题 作者 218 84 75 2007 7 5 18 37 回复此发言 10 回复 单项选择题标准化考试系统 高手们帮帮啊 小弟我很菜的 不 include include include struct question char ask 200 选择题题目 char answer 4 80 选择题选项 int right 正确答案 struct question next int MenuChoice void struct question InsertList struct question fst const struct question ad struct question ListSeek struct question seek long len long max void GetQuestion struct question src void SaveFile const struct question ed FILE saf struct question LoadFile struct question td FILE laf int GetAnswer void void ExplainQuestion const struct question que int n main struct question start NULL temp long choice line 0 c FILE fp fopen kstm dat a start LoadFile start fp while choice MenuChoice 3 if choice 1 GetQuestion start InsertList start line 统计列表的长度 else if choice 2 c 600 while c 500 c line printf 请输入要回答的问题数量 scanf d ExplainQuestion start line SaveFile start fp 进行最后的工作 fclose fp return 0 ListSeek 函数确定一个读取答案的位置 len 代表要读取的答案数 max 代表列表的长度 struct question ListSeek struct question seek long len long max int i srand time NULL while i rand max len next 找到指定的位置 return seek 向列表中插入试题 struct question InsertList struct question fst const struct question ad struct question newPtr struct question malloc sizeof struct question if newPtr NULL exit 0 newPtr ad newPtr next fst return newPtr 获取问题 选项 以及正确答案 void GetQuestion struct question src int i 0 printf 请输入选择题题目 n scanf s src ask while i answer i src right GetAnswer 从文件中读取题目 将题目添加到列表中 struct question LoadFile struct question td FILE laf struct question temp while fread return td 将列表中的试题保存在文件中 void SaveFile const struct question ed FILE saf fclose saf if saf fopen kstm dat w NULL 以写的方式重新打开文件 return while ed fwrite ed 1 sizeof struct question saf ed ed next 得到选择题的答案 不保证是正确的答案 int GetAnswer void int c 0 必须进行初始化 避免出现偶然性的错误 fflush stdin while c D 确保输入的答案是 A B C D 中的一个 printf 请输入正确的答案 scanf c return c 回答问题 并统计答对题目数 显示得分 void ExplainQuestion const struct question que int n int i 0 t n char result 1001 p result for i 0 n que que next printf s nA s nB s nC s nD s n n que ask que answer 0 que answer 1 que answer 2 que answer 3 if p que right p 1 GetAnswer i p 2 p 0 printf n 13s 13s s n 标准答案 您的答案 评价 for p result p 0 p 2 printf 13c 13c s n p p 1 p p 1 正确 错误 printf n 您回答了 d 道题 答对 d 道题目 得分 2f n n t i float i t 100 00 选择菜单
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 中考复习之文言文实词汇编
- 机械顶管专项施工方案
- 2026届贵州省施秉县九年级化学第一学期期中统考模拟试题含解析
- 2026届内蒙古开鲁县联考英语九上期末质量检测试题含解析
- 健康中国2030蓝图
- 2026届安徽省亳州市亳州市第一中学化学九年级第一学期期末教学质量检测模拟试题含解析
- 云南省陆良县2026届九年级化学第一学期期中复习检测试题含解析
- 项目总监工作总结
- 房屋植筋施工方案范文
- 北京市顺义区第一中学2025-2026学年高三上学期9月月考语文试题(含答案)
- (完整)注册安全工程师考试题库(含答案)
- 高考作文素材积累与写法总结27 自知与知人作文审题指导及素材积累
- 电子政务概论-形考任务5(在线测试权重20%)-国开-参考资料
- 2024年贵州省贵阳市中考生物地理合卷试题(含答案逐题解析)
- DNDC模型使用手册
- DL∕T 2487-2022 电力燃煤机械名词术语
- 起重机械生产单位质量安全总监-特种设备考试题库
- JBT 9189-2016 水基材料防锈试验方法 铸铁屑试验
- JJF 1064-2024 坐标测量机校准规范
- 《春江花月夜》省公开课金奖全国赛课一等奖微课获奖课件
- 人音版小学六年级上册音乐教案(本)
评论
0/150
提交评论