subject

Write a program that deals random cards, printing the "rank" of the card and its "suit" (both randomly generated) until you have dealt 4 aces. to select a card, you will first choose a random number from 1 - 13 which will represent the "rank" of the card. numbers from 2 through 10 can be printed just as they are. however, the number 1 should print "ace", the number 11 should print "jack", the number 12 should print "queen" and the number 13 should print "king". you will also have to select a second random number from 1 to 4 which represents the "suit". this is completely independent of the "rank" described above. (notice that each time you draw a card, it is as if it were from a fresh (undealt) deck. thus, it is possible to draw two or more "aces of spades", or two or more "3 of clubs".) at the end of the program, you should print out the number of face cards (jack, queen or king) that you dealt.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:00, sarah192002
You should hand write your references on your resume.
Answers: 1
image
Computers and Technology, 22.06.2019 17:00, silvijaaa
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
image
Computers and Technology, 24.06.2019 15:00, marelinatalia2000
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
You know the right answer?
Write a program that deals random cards, printing the "rank" of the card and its "suit" (both random...

Questions in other subjects:

Konu
Biology, 20.01.2021 20:30
Konu
Mathematics, 20.01.2021 20:30
Konu
English, 20.01.2021 20:30