Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please, i need help making it a higher card wins game #include #include #include using namespace std; const int MAX = 52; const int

C++ please, i need help making it a higher card wins game

image text in transcribed

#include  #include  #include  using namespace std; const int MAX = 52; const int ALL = 52; // Returns a string of random alphabets of // length n. string printRandomString(int n) { string alphabet[MAX] = { " 1s "," 2s "," 3s "," 4s "," 5s "," 6s "," 7s "," 8s "," 9s ", " 10s "," Js "," Qs "," Ks "," 1h "," 2h "," 3h "," 4h "," 5h ", " 6h "," 7h "," 8h "," 9h "," 10h "," Jh "," Qh "," Kh "," 1c ", " 2c "," 3c "," 4c "," 5c "," 6c "," 7c "," 8c "," 9c "," 10c ", " Jc "," Qc "," Kc "," 1d "," 2d "," 3d "," 4d "," 5d "," 6d ", " 7d "," 8d "," 9d "," 10d "," Jd "," Qd "," Kd " }; string res = ""; for (int i = 0; i   include #include #include    using namespace std; const int MAX = 52; const int ALL = 52; Returns a string of random alphabets of // length n string printRandomstring (int n) string alphabet [MAX ] = { " ls "," 2s "," 3s "," 4s "," 5s "," 6s "," 7s "," 8s "," 9s ", " 10s , Js"," Qs","Ks","lh "," 2h"," 3h"," 4h "," 5h ", " 6h "," 7h ","8h "," 9h"," 10h "," Jh"," Qh","Kh "," 1c ", " 2C "," 3c "," 4C","5c","6c", 7c"," 8C"," 9c"," 10c ", " "," QC ","  "," 1d "," 2d "," 3d "," 4d "," 5d "," 6d ", " 7d"," 8d,"9d"," 10d ","Jd"," Qd","Kd string res- 1I res = res + alphabet [rand ( ) % MAX]; return res; string printRandomstrings (int m) string alphabets [ALL] = { " ls "," 2s "," 3s "," 4s "," 5s "," 6s "," 7s "," 8s "," 9s ", "10s "," Js, QKs"," lh",2h "," 3h ","4h"," Sh", " 6h "," 7h "," 8h","9h"," 1Oh ","Jh "," Qh","Kh"," 1c , "2C," 3c ",4c","5c"," 6c "," 7c"," 8C",9c"," 1OC " Jc "," Qc ," Kc," ld",2d"3d "," 4d"," 5d"," 6d" " 7d"," 8d", " 9d "," 10d,Jd ","Qd "," Kd" string ran ""; for (inti0 i   using namespace std; const int MAX = 52; const int ALL = 52; Returns a string of random alphabets of // length n string printRandomstring (int n) string alphabet [MAX ] = { " ls "," 2s "," 3s "," 4s "," 5s "," 6s "," 7s "," 8s "," 9s ", " 10s , Js"," Qs","Ks","lh "," 2h"," 3h"," 4h "," 5h ", " 6h "," 7h ","8h "," 9h"," 10h "," Jh"," Qh","Kh "," 1c ", " 2C "," 3c "," 4C","5c","6c", 7c"," 8C"," 9c"," 10c ", " "," QC ","  "," 1d "," 2d "," 3d "," 4d "," 5d "," 6d ", " 7d"," 8d,"9d"," 10d ","Jd"," Qd","Kd string res- 1I res = res + alphabet [rand ( ) % MAX]; return res; string printRandomstrings (int m) string alphabets [ALL] = { " ls "," 2s "," 3s "," 4s "," 5s "," 6s "," 7s "," 8s "," 9s ", "10s "," Js, QKs"," lh",2h "," 3h ","4h"," Sh", " 6h "," 7h "," 8h","9h"," 1Oh ","Jh "," Qh","Kh"," 1c , "2C," 3c ",4c","5c"," 6c "," 7c"," 8C",9c"," 1OC " Jc "," Qc ," Kc," ld",2d"3d "," 4d"," 5d"," 6d" " 7d"," 8d", " 9d "," 10d,Jd ","Qd "," Kd" string ran ""; for (inti0 i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions