Deck of 32 cards | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Deck of 32 cards

Hi guys, I want to make a deck of 32 cards. Cards from two till Six are not counted. The rest are normal, Ace Queen jack etc.. Any suggestions?

2nd Mar 2018, 3:26 PM
Zeus
Zeus - avatar
1 Answer
+ 15
👉declare an String array of 32 elements , put 1st element as Ace , now run a loop from index 1 to index 31 //& then apply same idea as applied in code below[use % & if else statements ] https://code.sololearn.com/cQ3Pz4iBJt7b/?ref=app
2nd Mar 2018, 3:44 PM
Gaurav Agrawal
Gaurav Agrawal - avatar