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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag.e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
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
question
Mathematics, 07.04.2020 22:44
question
Mathematics, 07.04.2020 22:44
question
Mathematics, 07.04.2020 22:44
Questions on the website: 13722360