Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ please! this is my code so far: # include # include #include using namespace std; int main() { char ch; int playerChoice = 0;

image text in transcribedc++ please!

this is my code so far:

# include # include #include using namespace std; int main() { char ch; int playerChoice = 0; cout

while(true) { cout > playerChoice; switch(playerChoice) { case 1: if (playerChoice == 1) { cout

}

cout>ch;

if(ch=='Y') {

continue;

}else { break; } }

return 0; }

Project 2: Rock, Paper, Scissor:s flow of a program, and work on your C++ programming problem-solving. You will implement a rock-paper-scissors game. The purpose of this project is to use cin to handle user keyboard inputs, use branching statements to control the 1. The player enters 1 for Rock, 2 for Paper, or 3 for Scissors. 2. The computer randomly selects one of the three itself. 3. The program displays computer and player choices and who won (or if it is a tie). 4. Ask the player if they would like to play again. Implement the following features in addition to the game play: Keep a count of the number of times the player won, lost, and tied. Display these counts when the player ends the game. Keep a count of the number of times the player selects rock, selects scissors, and selects paper. When the player stops playing display these counts. Use the rand0 function to generate the computers selection. The code for this can be found in the project 1 writeup. Objectives: Work on your problem-solving abilities in C++ Use boolean expressions. Use branching statements and loops to control the flow of a program. . Extra Credit 1. When the player ends the game, display who won the most rounds. Also display the object the game winner won with the most. +5% 2. Tell the player what they should have chosen to win most of the time. For example, if the computer chose rock 7 out of the 10 times then the player should have chosen paper to win most of the time. +5%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago

Question

3. Explain the forces that influence how people handle conflict

Answered: 1 week ago