CPP
cpp
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
/*
♥️Challenge♥️ Shuffling a new deck of cards
Assume a new deck of cards is organized as follows:
♠️1, ♠️2, ..., ♠️10, ♠️J, ♠️Q, ♠️K, ♦️1, ♦️2, ..., ♦️10, ♦️J, ♦️Q, ♦️K, ♣️1, ♣️2, ..., ♣️10, ♣️J, ♣️Q, ♣️K, ♥️1, ♥️2, ..., ♥️10, ♥️J, ♥️Q, ♥️K
Write a program to do the followings:
1. Generate a new deck of cards and print it nicely!
2. Shuffle and print it three times!
*/
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
class Card
{
public :
Card(int _seed,int _value):
seed(_seed),value(_value)
{
switch (value)
{
case 1 :
depiction +="A ";
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run