I'm a beginner,Any sugestion in solving this progra mm(c++)

The memory game is a game played with 10 cards, each placed face down. Each card belongs to one of the suites diamonds, clubs, spades or hearts. Each card is also be numbered as ace, 2, 3, 4, 5, 6, 7, 8, 9, Jack, Queen or King. There are exactly 5 matching pairs of cards.

Each turn is as follows:

The player turns two cards upright.
If the cards are the same, then the cards remain upright.
If the cards are different, then the cards are turned face down again.
The cards always remain in the same relative position. Write a C++ program to implement this game. The game stops when all cards have been matched.
Once the game has concluded, ask the user if he/she wishes to play again.
Hint: you will need to remember the face value on the card, as well as whether the card is face down or not.
Hint: To generate the cards, generate a face value and two positions for the card. If the positions are not filled, place the card in both positions. Otherwise generate new positions and repeat. (You may choose each position independently)

Ask your teacher.
That's straight from home-work. WTH?
I have a question. All these little homework programs, and programs for final exams and such people post on here... well one, its against the rules in the 'read before posting' sticky but thats beside the point. Anyway, are these questions from like, a better high school then mine that actually has a computer science class, or are these like, college courses.

Just wondering because I want to get into college for programming some day, but so far im self taught, and alot of this stuff looks pretty easy compared to what im doing for fun. Like the one guy who needed to exhibit nested loops to make a pyramid. I literaly just finished writting nested loops in the text game im making to search each alias for each item in the room the player is in and if it matches the arguments for the take command, move it from the rooms inventory to the players inventory, and the same vice versa to drop that item.
These questions are usually from Intro classes.
Some people take a programming class because they think it will be easy.
I have taken two so far and all I do is homework for other classes in them because I whip up the programs the teacher hands out in 15 minutes. Other kids in that same class take two weeks to do the same assignment.

People that post homework questions either:

a) Didn't pay attention or learn it (the language) by themselves
b) They're lazy and don't want to do it
c) There is that rare case when someone actually has a valid question on something a little harder.

I didn't take programming classes to learn the language. I took them to solidify my self-taught methods.
Last edited on
Wow i thought my questions were bad at least i try to make the program work with my limited knowledge
That's what your supposed to do. :)
Topic archived. No new replies allowed.