Question: Programming language is C++ PA 7-2 (25 points) Write a program that rolls a pair of dice. If the sum of the dice is 2,
Programming language is C++

PA 7-2 (25 points) Write a program that rolls a pair of dice. If the sum of the dice is 2, 3, or 12, tell the player he/she has lost; if the sum is 7 or 11, tell the player he/she has won; if it is any other number 4,5,6,8,9,10), tell the player that he/she must roll again. To make a program pause to wait for user to press Enter, add this line of code cin.get(); DACodeBlocks-Ep\CodeBlocks-EpMarsh2050binDebug.Marsh2050.exe Press enter to rol1. First die is a 3 Second die is a 4 You rolled a 7. You won! That turn is over. D:\CodeBlocks.Ep\CodeBlocks-Ep\Marsh2050\binDebug\Marsh2050.exe Press enter to roll. First die is a2 Second die is ai You ro1led a 3. You lose! That turn is over D:ACodeBlocks-EPCodeBlocks-EPMarsh2050binlDebuglMarsh2050.exe Press enter to rol1. First die is a Second die is a1 You rolled a 4. You neither win or lose - roll again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
