Question: In java please. 4.30 Lab 10d: Marbles This program will answer the question How many combinations can you make with 5 marbles?. This will be

In java please. In java please. 4.30 Lab 10d: Marbles This program will answer

4.30 Lab 10d: Marbles This program will answer the question "How many combinations can you make with 5 marbles?". This will be determined with three given values to correspond to the number of marbles for three different colors. The three colors are red, blue and green. The user will input values for how many marbles you will have for each color in the same order the colors were just listed. The user will need to enter a value greater than 0 for each number otherwise the program will return O combinations. Also, the program will return 0 combinations if you have less than 5 marbles to begin with. The program will print out each combination in the following format: "Red: [numRed], Blue: [numBlue], Green: [numGreen] In addition, your program should also print out the total number of combinations. Consult the example input and output for any questions regarding the format of the printouts You will use for loops to complete this task. Example input: 3 Example output: Red: 0, Red: 0, Blue: 3, Green: 2 Red: 1, Blue: 1, Green Red: 1, Bl Red: 1, Blue: 3, Green Red: 2, Blue: 0, Green: Red: 2, Red: 2, Blue: 2, Green: 1 Red: 2, Blue: 3, Green: Red: 3, Blue: 0, Green: 2 Red: 3, Blue: 1, Green Red: 3, Blue: 2, Green: 12 Blue: 2, Green: 3 ue: 2, Green: : 1 Blue: 1, Green: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!