hello guys and girls,

as it's going to be quite obvious i'm not going to lie to you, this is coursework - however i really struggle with the programming aspect of my course and although repeatedly reading chapters in savitch's c++ guide and trying to understand my teacher i'm finding it extremely hard

i need to make both:

1) a simple rock, paper, scissors game
and
2) a simple hangman game

now i'm not expecting people to do it for me as obviously you wouldn't want to and it would be cheating but i'd love it if any of you guys could get me started or point me in the right direction for appropriate help for a noob :( !

Start out with the rock paper scissor games.

I'll try to give you a psuedo code body. (Not saying its right though)

#include<iostream>
using namespace std;

//function prototype
char getRandom(); //return random rock , paper , or scissors
int main()
{
     //create variables
   char playerPick= 0;
   char computerPick = 0;
   bool playAgain = true;

   while( playAgain == true )
  {
          //ask user to pick either rock, paper, or scissors
         // now get input into playerPick
 
        computerOption = generateRandom(); //get random rock , paper or scissors

      //compare values
      if playerPick equals computerPick then print its a tie
      else if player has a rock check to see what the computer has and determine the proper output
    else  if player has paper, check to see what the computer has and determine the proper output
   else if player has scissors, check to see what the computer has and determine the proper out put

  //ask use to play again ?
  // get input into the bool variable playAgain
   }

  //and we are done
  return 0;
}

I am not sure the specification of your game, like score keeper and
things, but the game logic is the same.

Get this done first and worry about the hangman.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.