A MUST READ TO WHO WILL ANSWER THIS QUESTION: A gentle reminder, PLEASE READ THE INSTRUCTIONS BELOW AND FOLLOW IT PLEASE. If you run the program you created, it should be EXACTLY like the sample run (LOOK IN THE PICTURE). PLEASE use the following function prototypes mention below. I'm begging you follow the steps. thank you<<3. Given the sample code below in generating a random number. Create a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don’t display the computer’s choice yet.) 2. The user enters his or her choice of “rock”, “paper”, or “scissors” at the keyboard. (You can use a menu if you prefer.) 3. The computer’s choice is displayed. 4. A winner is selected according to the following rules: a. If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) -> THIS MUST APPEAR IF YOU RUN THE CODE! Obviously exclude the parentheses. b. If one player chooses scissors and the other player chooses paper, then scissor wins. (Scissors cuts paper.) -> THIS MUST APPEAR IF YOU RUN THE CODE! Obviously exclude the parenthese. c. If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.) -> THIS MUST APPEAR IF YOU RUN THE CODE! Obviously exclude the parentheses. d. If both players make the same choice, the game must be played again to determine the winner. It's a tie! Play again to determine the winner. -> THIS MUST APPEAR IF YOU RUN THE CODE! Please Use the following function prototypes to perform each major task. 1. int random(); 2. string input(); 3. string compChoice(int); 4. void displayCompChoice(string); 5. bool compare(string, string)
Operations
In mathematics and computer science, an operation is an event that is carried out to satisfy a given task. Basic operations of a computer system are input, processing, output, storage, and control.
Basic Operators
An operator is a symbol that indicates an operation to be performed. We are familiar with operators in mathematics; operators used in computer programming are—in many ways—similar to mathematical operators.
Division Operator
We all learnt about division—and the division operator—in school. You probably know of both these symbols as representing division:
Modulus Operator
Modulus can be represented either as (mod or modulo) in computing operation. Modulus comes under arithmetic operations. Any number or variable which produces absolute value is modulus functionality. Magnitude of any function is totally changed by modulo operator as it changes even negative value to positive.
Operators
In the realm of programming, operators refer to the symbols that perform some function. They are tasked with instructing the compiler on the type of action that needs to be performed on the values passed as operands. Operators can be used in mathematical formulas and equations. In programming languages like Python, C, and Java, a variety of operators are defined.
A MUST READ TO WHO WILL ANSWER THIS QUESTION:
A gentle reminder, PLEASE READ THE INSTRUCTIONS BELOW AND FOLLOW IT PLEASE. If you run the
Given the sample code below in generating a random number. Create a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows.
1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don’t display the computer’s choice yet.)
2. The user enters his or her choice of “rock”, “paper”, or “scissors” at the keyboard. (You can use a menu if you prefer.)
3. The computer’s choice is displayed.
4. A winner is selected according to the following rules:
a. If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) -> THIS MUST APPEAR IF YOU RUN THE CODE! Obviously exclude the parentheses.
b. If one player chooses scissors and the other player chooses paper, then scissor wins. (Scissors cuts paper.) -> THIS MUST APPEAR IF YOU RUN THE CODE! Obviously exclude the parenthese.
c. If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.) -> THIS MUST APPEAR IF YOU RUN THE CODE! Obviously exclude the parentheses.
d. If both players make the same choice, the game must be played again to determine the winner. It's a tie! Play again to determine the winner. -> THIS MUST APPEAR IF YOU RUN THE CODE!
Please Use the following function prototypes to perform each major task.
1. int random();
2. string input();
3. string compChoice(int);
4. void displayCompChoice(string);
5. bool compare(string, string);
Step by step
Solved in 3 steps with 2 images