文件名称:exercise
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个含有多个菜单项的菜单演示程序,然后再为这些菜单项设计相应的功能。
要求:
(1)程序显示下列菜单选项:
1. 解一元二次方程
2. 石头、剪子、布游戏
3. 退出程序
选择1-3:
(2)用户选择1,则求解一元二次方程Ax² +Bx+C=0的根。用户输入A、B、C的值,输出方程根x1和x2。
(3)用户选择2,则模拟石头、剪子、布游戏。用户可以任选石头、剪子、布中的一种,计算机也随机产生3种物件之一,根据“石头赢剪子,剪子赢布,布赢石头”的规则判定胜负,另外,默认为一局定胜负,如果有可能,实现三局两胜的规则。
-Design a menu with multiple menu items demo program, and then design the corresponding menu items for these functions.
Requirements:
(1) program displays the following menu options:
1. Solving a quadratic equation
2. Rock, paper, scissors game
3. Exit the program
Select 1-3:
(2) the user selects 1, then solving a quadratic equation Ax ² + Bx+ C = 0 root. User input A, B, C values, the output equation roots x1 and x2.
(3) the user selects 2, the simulation of rock, paper, scissors game. Users can choose the stone, paper, scissors in one, the computer randomly generate one of three kinds of objects, according to "win the stone scissors, scissors wins cloth, stone, cloth wins" rule to determine the outcome of the other, the default is a Board will be played, if possible, to achieve best of three games of the rules.
要求:
(1)程序显示下列菜单选项:
1. 解一元二次方程
2. 石头、剪子、布游戏
3. 退出程序
选择1-3:
(2)用户选择1,则求解一元二次方程Ax² +Bx+C=0的根。用户输入A、B、C的值,输出方程根x1和x2。
(3)用户选择2,则模拟石头、剪子、布游戏。用户可以任选石头、剪子、布中的一种,计算机也随机产生3种物件之一,根据“石头赢剪子,剪子赢布,布赢石头”的规则判定胜负,另外,默认为一局定胜负,如果有可能,实现三局两胜的规则。
-Design a menu with multiple menu items demo program, and then design the corresponding menu items for these functions.
Requirements:
(1) program displays the following menu options:
1. Solving a quadratic equation
2. Rock, paper, scissors game
3. Exit the program
Select 1-3:
(2) the user selects 1, then solving a quadratic equation Ax ² + Bx+ C = 0 root. User input A, B, C values, the output equation roots x1 and x2.
(3) the user selects 2, the simulation of rock, paper, scissors game. Users can choose the stone, paper, scissors in one, the computer randomly generate one of three kinds of objects, according to "win the stone scissors, scissors wins cloth, stone, cloth wins" rule to determine the outcome of the other, the default is a Board will be played, if possible, to achieve best of three games of the rules.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
exercise.cpp