The Rock Paper Scissors Lizard Spock games. This is the infamous game brought to popularity with the TV show The Big Bang Theory. This training project, prepared by Codecademy.
Write a rock_paper_scissors.cpp program that:
- Prompts the user to select either Rock, Paper, Scissors, Lizard, or Spock.
- Instructs the computer to randomly select either Rock, Paper, Scissors, Lizard, or Spock.
- Compares the user’s choice and the computer’s choice and determine the winner.
- Informs the user who the winner is.
- C++
How to compile and execute:
- Download
rockpaper.cpp
. - Open command line interface and navigate to the directory where the files are downloaded.
- Run the following commands to compile and execute the program:
g++ rockpaper.cpp -o rockpaper
./rockpaper