Need to write a rock, paper, scissors game with directions function, and menu fu
ID: 3620796 • Letter: N
Question
Need to write a rock, paper, scissors game with directions function, and menu function I got those and they work. But I am at a complete blank for everything else. I need the program to randomly choose a number 1 through 3 for it's chose then user choose a number. The program also needs to keep track of how many of games the computer won and the player won. Please help ASAP heres the code I have so far#include <iostream>
using namespace std;
// Function Prototypes
int directions ();
int menu ();
int main()
{
directions ();
menu ();
return 0;
}
//Directions
int directions()
{
cout << "You are currently about to play a game of " << endl;
cout << "Rock, Paper, Scissors against the computer" << endl;
cout << endl;
cout << "To play choose whether you want Rock, Paper," << endl;
cout << "or scissors. The computer will randomly pick" << endl;
cout << "an object as well. Rock beats scissors, Paper" << endl;
cout << "covers rock, and scissors cut paper" << endl;
cout << endl;
cout << "***********************************************" <<endl;
cout << endl;
return 0;
}
//Menu
int menu()
{
int choice;
cout << "Please choose which object you would like:" << endl;
cout << "(1) Rock " << endl;
cout << "(2) Paper " << endl;
cout << "(3) Scissors " << endl;
cout << "(4) Exit Game " << endl;
cin >> choice;
while (choice < 1 || choice > 4 ) // Validate input
{
cout << "Invalid Selection. Enter 1, 2, 3, or 4: ";
cin >> choice;
}
return choice;
}
Explanation / Answer
please rate - thanks this one is completeRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.