1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
using namespace std;
int main()
{
string lol[53]={0,"1heart","2heart","3heart","4heart","5heart","6heart","7heart","8heart","9heart","10heart","Jheart","Qheart","Kheart",
"1diamond","2diamond","3diamond','4diamond","5diamond","6diamond","7diamond","8diamond","9diamond","10diamond","Jdiamond","Qdiamond","Kdiamond",
"1spade","2spade","3spade","4spade","5spade","6spade","7spade","8spade","9spade","10spade","Jspade","Qspade","Kspade",
"1season","2season","3season","4season","5season","6season","7season","8season","9season","10season","Jseason","Qseason","Kseason"};
srand(time(0));
string I1,I2,I3,I4;
I1=lol[1+rand()%53];
I2=lol[1+rand()%53];
I3=lol[1+rand()%53];
I4=lol[1+rand()%53];
cout<<" Paper That have been Choseen are : "<<endl;
cout<<"Paper1 : "<<I1<<endl;
cout<<"Paper2 : "<<I2<<endl;
cout<<"Paper3 : "<<I3<<endl;
cout<<"Paper4 : "<<I4<<endl;
if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Jheart")
cout<<"You Win"<<endl;
if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Jdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Jspade")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Jseason")
cout<<"You Win"<<endl;
if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Qheart")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Qdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Qspade")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Qseason")
cout<<"You Win"<<endl;
if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Kheart")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Kdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Kspade")
cout<<"You Win"<<endl;
else if(I1=="Jheart"&&I2=="Qheart"&&I3=="Kheart"&&I4=="Kseason")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Jheart")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Jdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Jspade")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Jseason")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Jheart")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Qdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Qspade")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Qseason")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Jheart")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Kdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Kspade")
cout<<"You Win"<<endl;
else if(I1=="Jdiamond"&&I2=="Qdiamond"&&I3=="Kdiamond"&&I4=="Kseason")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Jheart")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Jdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Jspade")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Jseason")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Qheart")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Qdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Qspade")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Qseason")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Kheart")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Kdiamond")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Kspade")
cout<<"You Win"<<endl;
else if(I1=="Jspade"&&I2=="Qspade"&&I3=="Kspade"&&I4=="Kseason")
cout<<"You Win"<<endl;
return 0;
}
|