subject
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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
You know the right answer?
Write a program that simulates rolling one die using the following steps: 1. prompt the user for th...
Questions
question
Mathematics, 21.05.2020 06:05
Questions on the website: 13722361