Computers and Technology

Write a function that plays the popular scissor-rock-paper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper can wrap a rock.) Function prototype: void gameOfScissorRockPaper(int) The function randomly generates a number 0, 1, or 2 representing SCISSOR, ROCK, and PAPER. It prompts the user to enter a number 0, 1, or 2 and displays messages indicating the choices from the user and computer, whether the user or the computer wins, loses, or draws. If the user enters an invalid choice, prompt an error message, and ask to re-enter the choice. The function takes one int argument specified how many FIRST wins from the computer or the user to win the game. It will let the user continuously play until either the user or the computer wins. Use enum to define Inputs values as below to check the user's input in your program, enum Inputs { SCISSOR=0,ROCK, PAPER};

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:00, raizagisselle1273
If a client wants to make minor edits, what should he/she use?
Answers: 3
image
Computers and Technology, 22.06.2019 18:30, ovoxotas
Which of the following commands is more recommended while creating a bot?
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, ksanchez2100
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
Do you know the correct answer?
Write a function that plays the popular scissor-rock-paper game. (A scissor can cut a paper, a rock...

Questions in other subjects:

Konu
Geography, 06.01.2020 18:31
Konu
Health, 06.01.2020 18:31