Question: Picking four cards(In java) Write a program that picks four cards from a deck of 52 cards and compute their sum. An Ace, King, Queen,
Picking four cards(In java)
Write a program that picks four cards from a deck of 52 cards and compute their sum. An Ace, King,
Queen, Jack represent 1,13,12,11, respectively. Your program needs to ask the user for the sum, then
find the number of the total combinations, the number of the combinations that yields the sum. And the
list of all the combinations that yields the sum.
Please follow this shell when coding
https://shrib.com/#u6f6q24n3ax4dDXNTHlY
Here is the sample output
Enter the sum of the combinations that you want:52
Here is the list of all the combinations:
13 13 13 13
Total number of combinations: 270725
The number of picks that yields the sum of 52 is 1
Do you want to continue: yes
Enter the sum of the combinations that you want: fgg
Enter the sum of the combinations that you want : dfgg
Enter the sum of the combinations that you want: dffg
Enter the sum of the combinations that you want: fdgfg
Enter the sum of the combinations that you want: -45
Enter the sum of the combinations that you want: 51
Here is the list of all the combinations:
12 13 13 13
12 13 13 13
12 13 13 13
12 13 13 13
13 12 13 13
13 12 13 13
13 12 13 13
13 13 12 13
13 13 12 13
13 13 13 12
13 13 12 13
13 12 13 13
13 13 12 13
12 13 13 13
13 12 13 13
13 13 12 13
Total number of combinations: 270725
The number of picks that yields the sum of 51 is 16
Do you want to continue: no
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
