subject
Computers and Technology, 02.03.2021 02:50 Cocco

Write a user input program that simulates a game of a rolling pair of dice. You can create/simulate rolling one die by choosing one of the integers values of 1, 2, 3, 4, 5, or 6 at randomly. The number that the user chooses will represents the number on the dice after it is rolled. As a hint use Math. random Which will perform the computation to select a random integer between 1 and 6. Assign the value to a variable to represent one of the dice that are being rolled. Perform this operation twice then you will add the results in order to obtain the total roll. Your program should output the number showing on each dice as well as the total roll. For example:

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, mikey3882
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
image
Computers and Technology, 24.06.2019 00:50, JakeCline
Which of the following is not a key player in the sale of travel products?
Answers: 2
image
Computers and Technology, 25.06.2019 15:00, alanahjones63
What is the first step in necessary to begin setting up a website once a host has been selected and paid
Answers: 1
image
Computers and Technology, 25.06.2019 22:00, Wookas8355
What statement provides an example of designing a solution in the technological design process?
Answers: 1
You know the right answer?
Write a user input program that simulates a game of a rolling pair of dice. You can create/simulate...

Questions in other subjects:

Konu
History, 24.02.2022 09:00