Write a second game program that prints a chart to the screen showing the random
ID: 3545221 • Letter: W
Question
Write a second game program that prints a chart to the screen showing the randomness of a die. The game should first prompt the client for a number of die throws that he would like. The game then throws the die that many times. The game then prints a chart showing a line of asterisks for each die number, indicating the number of times the die landed with that face number on top. If the die behaves in a truly random fashion, each chart will look a little different, reflecting the randomness of the die. Allow the client to repeat the game as many times as she wishes. Use several methods: you might have one for input, one for processing, and one for output. Guarantee the number entered is not less than zero. Recall System.out.print(); does not give a new line and can be used to print a series of asterisks or a string of asterisks can be lengthened by adding the String
Explanation / Answer
#include #include #include main() { //declare integers int total_amt, bet_amt, win_amt, play_method, r, choice, color, num; //may need constants here //opening statement coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.