欢迎来到天天文库
浏览记录
ID:56979425
大小:16.00 KB
页数:2页
时间:2020-07-30
《C语言大作业题目.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Coursework2016DeadLineJune27th Writeaprogramthatwillhelpelementaryschoolpupilspracticemath.a) Theprogramwillfirstasktheuserforhis/herIDnumber(includingtwoletters&4digits),e.g.PleaseinputyourfourdigitIDno: AB1234 Theprogramshouldhaveinputvalidation.Thentheprogrampromptsthree
2、choices:(1) Startatest(2) Checkscores(3) Exit Test:theprogramwillgive10mathproblems,e.g.: 12* 3= 3648+32= 80…56/28= 2 Note:i)Pupilswillanswereachproblembeforethenextoneisgiven. ii)Theproblemsshouldincludeaddition,subtraction,multiplicationanddivision.Theyarerandomlygenerated. i
3、ii)Randomlygeneratesnumbersforproblems.However,mustensurethatboththeproblemandtheresultarenolargerthantwodigits.Theproblemandtheresultshouldbegreaterthanorequaltozero.Thedivisorcannotbezero. iv)Aftertenproblemsarefinished,recordthetimeusedbythestudenttodothetenproblems. v)Givesascoret
4、oeachstudent.Savesthisstudent’sID,his/herscoreandthetimeusedintoafilenamed‘record.txt’. vi)Printthefollowinginformationonthescreen:Prob.
5、CorrectAnsw.
6、 UrAnsw c) Checkscores:Searchesthefile‘record.txt’andlistsallthehistoricalscoresforthisstudent,e.g.: Yourpreviousrecordsare:AB123
7、4 80 150secondsAB1234 50 182secondsAB1234 90 98seconds Youwillbemarkedbasedonyourprogram’s:(1) Correctiveness(2) Readability(3) Robustness(4) Conciseness
此文档下载收益归作者所有