(Solved) : Write Following Program Using C Language Sure Properly Comment Label Problem Asked Create Q42778791 . . .

*** Write the following program using C++ language. Besure to properly comment and label. ***

The Problem:

You are asked to create a program that mimics the game Memory.You are to do it by having two “decks” of cards with values 1-10,randomly inserted into each deck (effectively, you will create tworows of 10 cards each, randomly ordered). The values of these twodecks will be stored in two separate arrays but the specific orderof these values (the order of the cards in the deck) will be hiddenfrom the user.

The card choices will be displayed “face down” to the user withthe top row numbered 1-10 and the second row numbered 11-20. Then,prompt the user to pick a card from each row of cards. If there isa match, the two cards are discarded (an X will appear in the rowfor each matched pair). The user continues to play the game untilall ten matches have been found.

You are free to implement a solution however you see fit.However, you must design and make use of at least two functions inaddition to your main (driver) function. Be sure to pay attentionto alignment, spacing, and line breaks to make sure that your codematches the sample run’s output provided below.

You must include proper comments and/or documentation for themain function, as well as any functions that you write.

Sample Run:

A Sample Run: *kkkkkk ********************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you li

14 14 is a (n) 10 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from

***************************** X X X 4 5 6 7 8 9 10 11 X 13 14 15 16 17 18 X X What number card would you like to check from tWhat number card would you like to check from the second row? 13 13 is a (n) 5 No match! ***************************** X X X

***** ******************* X X X X X X X 8 9 10 X X 13 X 15 X 17 X X X What number card would you like to check from the first

A Sample Run: *kkkkkk ********************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 11 11 is a (n) 8 No match! ***************************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 1 is a (n) 4 What number card would you like to check from the second row? 1212 is a (n) 3 1a No match! ***************************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 13 13 is a (n) 5 No match! ***************************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? i is a (n) 4 What number card would you like to check from the second row? 14 14 is a (n) 10 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 1 is a 4 What number card would you like to check from the second row? 15 15 is a 6 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 16 16 is a (n) 1 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 11 is a (n) 4 What number card would you liketo check from the second row? 17 17 is a (n) 7 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 18 18 is a (n) 2 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 We were unable to transcribe this image***************************** X X X 4 5 6 7 8 9 10 11 X 13 14 15 16 17 18 X X What number card would you like to check from the first row? 4 is a (n) 10 What number card would you like to check from the second row? 14 14 is a (n) 10 Match! ***************************** X X X X 5 6 7 8 9 10 11 X 13 X 15 16 17 18 X X What number card would you like to check from the first row? 5 is a (n) 1 What number card would you like to check from the second row? 16 16 is a (n) 1 Match! **************************** X X X X X 6 7 8 9 10 11 X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 6 is a (n) 8 What number card would you like to check from the second row? 11 11 is a (n) 8 Match! ***************************** X X X X X X 7 8 9 10 X X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2 What number card would you like to check from the second row? 13 13 is a (n) 5 No match! ***************************** X X X X X X 7 8 9 10 X X 13 x 15 x 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2 What number card would you like to check from the second row? 15 15 is a (n) 6 No match! ***************************** X X X X X X 7 8 9 10 X X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2 What number card would you like to check from the second row? 17 17 is a (n) 7 No match! ***************************** X X X X X X 7 8 9 10 X X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2 What number card would you like to check from the second row? 18 18 is a (n) 2 Match! ***** ******************* X X X X X X X 8 9 10 X X 13 X 15 X 17 X X X What number card would you like to check from the first row? 8 is a (n) ? What number card would you like to check from the second row? 17 17 is a (n) 7 Match! X X X X X X X X 9 10 XX 13 X 15 X X X X X What number card would you like to check from the first row? 99 is a (n) 5 What number card would you like to check from the second row? 13 13 is a (n) 5 Match! ***************************** X X X X X X X X X 10 X X X X 15 X X X X X What number card would you like to check from the first row? 10 10 is a (n) 6 What number card would you like to check from the second row? 15 15 is a (n) 6 Match! ***************************** XXXXXXXXXX X X X X X X X X X X Game Over! Show transcribed image text A Sample Run: *kkkkkk ********************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 11 11 is a (n) 8 No match! ***************************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 1 is a (n) 4 What number card would you like to check from the second row? 1212 is a (n) 3 1a No match! ***************************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 13 13 is a (n) 5 No match! ***************************** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? i is a (n) 4 What number card would you like to check from the second row?
14 14 is a (n) 10 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 1 is a 4 What number card would you like to check from the second row? 15 15 is a 6 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 16 16 is a (n) 1 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 11 is a (n) 4 What number card would you liketo check from the second row? 17 17 is a (n) 7 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4 What number card would you like to check from the second row? 18 18 is a (n) 2 No match! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 What number card would you like to check from the first row? 1 is a (n) 4

***************************** X X X 4 5 6 7 8 9 10 11 X 13 14 15 16 17 18 X X What number card would you like to check from the first row? 4 is a (n) 10 What number card would you like to check from the second row? 14 14 is a (n) 10 Match! ***************************** X X X X 5 6 7 8 9 10 11 X 13 X 15 16 17 18 X X What number card would you like to check from the first row? 5 is a (n) 1 What number card would you like to check from the second row? 16 16 is a (n) 1 Match! **************************** X X X X X 6 7 8 9 10 11 X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 6 is a (n) 8 What number card would you like to check from the second row? 11 11 is a (n) 8 Match! ***************************** X X X X X X 7 8 9 10 X X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2
What number card would you like to check from the second row? 13 13 is a (n) 5 No match! ***************************** X X X X X X 7 8 9 10 X X 13 x 15 x 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2 What number card would you like to check from the second row? 15 15 is a (n) 6 No match! ***************************** X X X X X X 7 8 9 10 X X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2 What number card would you like to check from the second row? 17 17 is a (n) 7 No match! ***************************** X X X X X X 7 8 9 10 X X 13 X 15 X 17 18 X X What number card would you like to check from the first row? 7 is a (n) 2 What number card would you like to check from the second row? 18 18 is a (n) 2 Match!
***** ******************* X X X X X X X 8 9 10 X X 13 X 15 X 17 X X X What number card would you like to check from the first row? 8 is a (n) ? What number card would you like to check from the second row? 17 17 is a (n) 7 Match! X X X X X X X X 9 10 XX 13 X 15 X X X X X What number card would you like to check from the first row? 99 is a (n) 5 What number card would you like to check from the second row? 13 13 is a (n) 5 Match! ***************************** X X X X X X X X X 10 X X X X 15 X X X X X What number card would you like to check from the first row? 10 10 is a (n) 6 What number card would you like to check from the second row? 15 15 is a (n) 6 Match! ***************************** XXXXXXXXXX X X X X X X X X X X Game Over!

Expert Answer


Answer to *** Write the following program using C++ language. Be sure to properly comment and label. *** The Problem: You are aske…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?