Computers and Technology

C++ Project Help For this project, you will be playing a dice game where you roll a die once. Record your number and then roll again. If the sum of the two rolls is 2, 4, or 7 you win another turn. In order to simulate rolling a dice, you will ask the user to enter the word roll. In the spirit of following directions, if the user misspells the word roll, you will default their roll to zero. Keep playing this game as long as the player has a sum of 2, 4, or 7. Display the number of times the player won at the end of the game.

If the player doesn’t get a sum of 2, 4, or 7 display better luck next time. Otherwise, if the player has a sum of 2 display “Very Lucky!”, a sum of 4 display “My favorite number!”, or a sum of 7 display “Lucky Seven!”.

Random Number:
Use the below code to get a “random” number.
srand((unsigned)time(NULL));

This is high-school Computer Science C++

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:30, amaliabarrera9
The can be used to paste text in any order
Answers: 1
image
Computers and Technology, 22.06.2019 04:00, yolo1430
Acetylene is a gas which burns rapidly on its own, and is considered highly explosive. a) true b) false
Answers: 2
image
Computers and Technology, 23.06.2019 13:30, juliajordan427
Best laptops for college [$100-$500 range]?
Answers: 2
image
Computers and Technology, 24.06.2019 06:30, titalili0204
Adrawing that places all lines parallel to the z axis at an angle from the horizon is 99 ! a. an oblique drawing b. a perspective drawing c. an auxiliary view d. a one-point perspective drawing
Answers: 2
Do you know the correct answer?
C++ Project Help For this project, you will be playing a dice game where you roll a die once. Recor...

Questions in other subjects:

Konu
History, 08.01.2021 19:20