《C语言大作业题目.pdf》由会员分享,可在线阅读,更多相关《C语言大作业题目.pdf(2页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、Coursework 2016 DeadLine June 27thWrite a program that will help elementary school pupils practice math.a)The program will first ask the user for his/her ID number(including two letters&4 digits),e.g.Please input your four digit ID no:AB1234 The program should have input validation.Then the program
2、prompts three choices:(1)Start a test(2)Check scores(3)ExitTest:the program will give 10 math problems,e.g.:12*3=3648+32=8056/28=2Note:i)Pupils will answer each problem before the next one is given.ii)The problems should include addition,subtraction,multiplication anddivision.They are randomly gener
3、ated.iii)Randomly generates numbers for problems.However,must ensure thatboth the problem and the result are no larger than two digits.The problemand the result should be greater than or equal to zero.The divisor cannot bezero.iv)After ten problems are finished,record the time used by the student to
4、 dothe ten problems.v)Gives a score to each student.Saves this students ID,his/her score andthe time used into a file named record.txt.vi)Print the following information on the screen:Prob.|Correct Answ.|Ur Answc)Check scores:Searches the file record.txt and lists all the historical scoresfor this student,e.g.:Your previous records are:AB1234 80 150 secondsAB1234 50 182 secondsAB1234 90 98 secondsYou will be marked based on your programs:(1)Correctiveness(2)Readability(3)Robustness(4)Conciseness