#include
#include
#include
#include
#include
#include
using namespace std;
using std::cout;
using std::strcmp;
//int random;
int main()
{
srand((unsigned)time(0));
string general[52] = {"Ah","2h","3h","4h","5h","6h","7h","8h","9h","10h","Jh","Qh","Kh","Ac","2c","3c","4c","5c","6c","7c","8c","9c","10c","Jc","Qc","Kc",
"As","2s","3s","4s","5s","6s","7s","8s","9s","10s","Js","Qs","Ks","Ad","2d","3d","4d","5d","6d","7d","8d","9d","10d","Jd","Qd","Kd"};
int generalnumber[]={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}; //shuffled array
int id1, id2;
int temp;
for (int i = 0; i <=300; i++ )
{
id1 = rand()%52;
id2 = rand()%52;
if(id1!=id2)
{
temp = generalnumber[id2];
generalnumber[id2] = gene
2007-03-17
08:16:59
·
2 answers
·
asked by
Jayu P
1