Question: Write a c++ program to play a memory game. The game consists of a game board that has r rows and c cols (work with

Write a c++ program to play a memory game. The game consists of a game board that has r rows and c cols (work with a minimum of 20 spaces on the board). The board consists of matching pair of numbers, every number on the board will have a pair located somewhere else on the board. So if your board contains 30 spaces, there will be 15 pairs

The numbers in the board should be generated randomly (random number generator)

The location the pairs should be put in the board should also be generated randomly.

Your program should have the user try to select two position that have matching content. If the positions don't match

output an appropriate message along with the content of both positions. If the user guess a correct pair, it should print an appropriate message, and should not let the user guess any of those positions again (Guess it should print an appropriate message). Use functions to implement it. Use as many functions as you require.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!