Computers and Technology
Computers and Technology, 26.11.2019 04:31, bri1623

Using c++chapter 6 - programming challenge 24 - rock paper scissors gamemake sure you use at least one function to make your code modular. rock, paper, scissors gamewrite 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: ⢠if one player chooses rock and the other player chooses scissors, then rock wins.(the rock smashes the scissors.)⢠if one player chooses scissors and the other player chooses paper, then scissorswins. (scissors cuts paper.)⢠if one player chooses paper and the other player chooses rock, then paper wins.(paper wraps rock.)⢠if both players make the same choice, the game must be played again to determinethe winner. be sure to divide the program into functions that perform each major task.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:20, ChaosMind
Write a program that reads a file consisting of students’ test scores in the range 0–200. it should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. output the score ranges and the number of students. (run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.)
Answers: 3
image
Computers and Technology, 23.06.2019 03:30, natalie2sheffield
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, brittneyrenae7338
This question involves a class named textfile that represents a text file. public class textfile { private string filename; private string filename; private arraylist words; // constructors not shown // postcondition: returns the number of bytes in this file public int filesize() { } // precondition: 0 < = index < words. size() // postcondition: removes numwords words from the words arraylist beginning at // index. public void deletewords(int index, int numwords) { } // precondition: 0 < = index < = words. size() // postcondition: adds elements from newwords array to words arraylist beginning // at index. pub lic voidaddwords(int index, string[] newwords) { } // other methods not shown } complete the filesize() method. the filesize() is computed in bytes. in a text file, each character in each word counts as one byte. in addition, there is a space in between each word in the words arraylist, and each of those spaces also counts as one byte. for example, suppose the words arraylist stores the following words: { mary had a little lamb; its fleece was white as snow. } the filesize() method would compute 4 + 3 + 1 + 6 + 5 + 4 + 6 + 3 + 5 + 2 + 5 as the sum of the lengths of each string in the arraylist. the value returned would be this sum plus 10, because there would also be 10 spaces in between the 11 words. complete the filesize() method below: // postcondition: returns the number of bytes in this file public int filesize() { }
Answers: 1
image
Computers and Technology, 24.06.2019 05:00, alfarodougoy8lvt
Who is most likely be your target audience if you create a slide presentation that had yellow background and purple text
Answers: 2
Do you know the correct answer?
Using c++chapter 6 - programming challenge 24 - rock paper scissors gamemake sure you use at least o...

Questions in other subjects:

Konu
Mathematics, 06.11.2020 02:50
Konu
Mathematics, 06.11.2020 02:50