[Solved] SOLVED: Lottery

30 $

File Name: SOLVED:_Lottery.zip
File Size: 141.3 KB

SKU: [Solved] SOLVED: Lottery Category: Tag:

Or Upload Your Assignment Here:


CMIS 141 7984 Introductory Programming (2158) Write a Java program to simulate a pick 3, 4 or 5 lottery drawing. A lottery game of this type will draw values between 0 and 9. You should use the Math.Random() or the java.util.Random() class to generate the values in the lottery drawing. The program should prompt the user for which lottery game they want to play. The program should also ask how many times they want to play the game. The output should show the numbers picked for each game and the sum of the numbers of all games. Here is a sample run: Which lottery game do you want to play (Enter 3 for pick-3, 4 for pick-4 or 5 for pick-5? 3 How many games would you like to play? 10 Thank you! The numbers selected were: 3 4 9 2 4 7 3 3 1 0 3 2 9 3 1 9 2 4 4 5 2 1 1 0 0 1 7 8 6 3 The sum for all numbers picked was: 107

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED: Lottery
30 $