Computers and Technology
Computers and Technology, 16.10.2019 00:00, doanh27

Write a program that simulates rolling one die using the following steps: 1. prompt the user for the number of sides on the die. 2. "roll" the die three times by generating a random number between 1 and the number of sides (inclusive). 3. keep track of the running sum of the rolls for the die and output the sum and average for the three rolls at the end. 4. you can set up one integer variable named roll and reuse it with each roll of the die. you will also need a variable named total, initialized to zero.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, Wolfie215
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
image
Computers and Technology, 22.06.2019 16:20, kimmmmmmy333
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
image
Computers and Technology, 22.06.2019 18:30, yayamcneal05
Which cultural aspect does this type of song best portray? a german polka dance
Answers: 1
image
Computers and Technology, 24.06.2019 03:00, greenhappypiggies
Using a conditional expression, write a statement that increments numusers if updatedirection is 1, otherwise decrements numusers. ex: if numusers is 8 and updatedirection is 1, numusers becomes 9; if updatedirection is 0, numusers becomes 7.
Answers: 1
Do you know the correct answer?
Write a program that simulates rolling one die using the following steps: 1. prompt the user for th...

Questions in other subjects:

Konu
Arts, 11.11.2020 01:00