Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Rock Paper Scissors - C++

felipenixon
felipenixon 


Pretty basic code needed with iostream library and a library necessary for use of random number generation. The program must have ALL of the following components: 1. declare and use at least 3 constants and 3 variables 2. ask the player for input that represents a choice 3. keep running in a loop until someone wins (i.e. multiple rounds) 4. generate the opponent's "choice" using a random number generator 5. define and appropriately use at least two functions 6. declare and appropriately use at least one array 7. pass a pointer to one of the functions and use it appropriately in the function Attachments
Tags Clarifications

Answers

Rock Paper Scissors

dickersonka
dickersonka 



Rock Paper Scissors Assignment with comments attached Attachments
RockPaperScissors.cpp (2 K) Download Preview
(compchoice == paper) cout << "It's a tie!\n\n\n\n"; else if (compchoice == rock) cout << "Paper beats rock! You win!" << endl; else if (compchoice == scissors) cout << "Scissors beat paper! Sorry, you lose!" << endl; } if (choice == scissors)

Screenshots
Purchase Answer