讲解:C++、、、FunctionsC/C++

RequirementCMPSC 121Spring 2017Lab 6- FunctionsWrite a program that can be used as a math tutor for a young student. Use the rand function to produce two positive integers between 1 and 20.The program should display a menu allowing the user to select an addition, subtraction, or multiplication problem. The final selection on the menu should let the user quit the program.After the user has finished the math problem, the program should check the student’s answer and display whether it is correct and display the menu again. This process is repeated untilthe user chooses to quit the program. If the user selects an item not on the menu, program should display an error message and ask the user to enter a valid number. Be sure to divide theprogram into functions that perform. each major task.Sample run:Math Tutor Menu——————————1. Addition problem2. Subtraction problem3. Multiplication problem4.C++代写加法、减法、乘法、除法Functions代做C/C++编程作业 Quit this program——————————Enter your choice (1-4): 210 - 7 = 3Congratulations! That’s right.Math Tutor Menu——————————1. Addition problem2. Subtraction problem3. Multiplication problem4. Quit this program——————————Enter your choice (1-4): 8The valid choices are 1, 2, 3, and 4. Please choose: 37 * 12 = 74Sorry, the correct answer is 84.Math Tutor Menu——————————1. Addition problem2. Subtraction problem3. Multiplication problem4. Quit this program——————————Enter your choice (1-4): 4Thank you for using Math Tutor.Upload your source file (.cpp) via Angel.& 转自:http://ass.3daixie.com/2018052610496823.html

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容