Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Rock-Paper-Scissors Simulation Game The Rock-paper-scissors is a hand game usually played by two people (explained here). Your task is to realize a C++ program that

image text in transcribed
image text in transcribed
Rock-Paper-Scissors Simulation Game The Rock-paper-scissors is a hand game usually played by two people (explained here). Your task is to realize a C++ program that reads your turn as a character symbol, eltherr, P. , and which is rock, paper, sor, and quit, respectively. The computer will choose its turn randomly and determine if it won, lost, or tied. The game repeats until you type quit). When finishing, the program shows the statistics. The next output shows an example of program execution: Rock-paper-scissors shoot P I'm scissors, I wont Rock-paper-scissors shoo: R I'm rock, tied... Rock-paper-scissors Shoot I'm paper, you wont Rock-paper-scissors shoot T Oops... Rock-paper-scissors shoo: 4 You won 1, lost i, tied 1. You won 50.000 The requirements are: 1. The program can read either lowercase letters or uppercase letters, e.g. rand Rare treated the same as the above session 2. The program finds typos and repeats the tum, e.g. showing Oops... 3. The winning rate should be shown up to two fractional digits, eg..50.00 4. The program must utilize rand built-in function to determine its tum. 5. The output of the program must resemble the format shown above. Rock-Paper-Scissors Simulation Game Theory says (0.9. bere), you can win around 50% against a computer that picks randomly each time. Can you verify this by experimenting with your implementation? Also, try to produce this program with the total number of C++ statements (1.., the total line count) as small as possible. I am not asking to reduce the number of variables, length of variable names, or comment words, but asking to realize your entire coding just fitting in one page so that I can read what you wrote only at a glance. Your reward is an extra 2 points. The important practice is to write a program or a part of a program within one page so as to enhance its readability, the program is read more often than written. Indeed, no one knows the ideal number of lines per page in programming. How about this approximation? Everything posted here is partially or completely reserved and protected by Professor Akira Kawaguch, Students are expected to respect the intellectual property rights of the faculty and the College. It is unethical and illegal to infringe such rights, and infringement will not be tolerated at City College. In particulis, students must not distribute or publish online, without explicit permission, any material developed for use in a course or project at City College. Such material includes, but is not limited to, homework assignments, test questions, lecture notes and videos, answers to test problems, corrected homework or problem sets, and internal reports ce Oo Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License This work is licensed unde

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

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago