Previously written by C ++, the license plate

xiaoxiao2021-03-06  41

#include #include #include

int pk [] = {501,502, 101,102,103,104,105,106,107,108,109,110,111,112,113, 201,202,203,204,205,206,207,208,209,210,211,212,213, 301,302,303,304,305,306,307,308,309,310,311,312,313, 401,402,403,404,405,406,407,408,409,410,411,412,413}; int a [14], b [14], c [13], d [13];

Class Pack {public: void makepack (); void fapack (); void disp ();

Void Pack :: makepack () {int Temp, r, times; coup number: "; cin >> Times; cout << end1

For (int J = 0; j <= Times; J ) {for (int i = 0; i <53; i ) {r = int (FLOAT (53-I) * RAND () / rand_max) 1; Temp = PK [I]; PK [I] = PK [R]; PK [R] = Temp;}}}

Void Pack :: FAPACK () {INT I, J; J = 0; COUT << "Brake ..." << Endl; for (i = 0; i <= 53; i ) {a [J] = PK [I]; i ; b [j] = pk [i]; i ; if (j <= 12) {c [j] = pk [i]; i ; d [j] = pk [i]; } IF (j> 12) i ; J ;}}

Void Pack :: Disp () {cout << "The card is:"; for (int i = 0; i <14; i ) cout << a [i] <<, "; cout << endl;

COUT << "B brand is:"; for (i = 0; i <14; i ) cout << b [i] << ", cout << endl;

COUT << "The card is:"; for (i = 0; i <13; i ) cout << c [i] << ","; cout << endl;

COUT << "The card is:"; for (i = 0; i <13; i ) cout << D [i] << ","; cout << endl;}

INT main () {cout << "============== Simulated shuffle && issued card ===============" << endl; cout << "= Description: =" << Endl; cout << "= starting with 5 is ghost =" << Endl; cout << "= started with 1 red peach =" << endl; cout << "= 5 starting with 2 =" << Endl; cout << "= sunflower flavor started with 3 =" << Endl; cout << "= starting with 4, grass flower =" << Endl; cout < <"==================================================== << endL; Pack mypack; mypack.makepack (); mypack.fapack (); cout << endl

mypack.disp ();

GetChar (); Return 0;

转载请注明原文地址:https://www.9cbs.com/read-56761.html

New Post(0)