1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aleksandr82 [10.1K]
4 years ago
14

When a function changes the value of reference parameter, the value of the actual parameter will get changed as well.

Computers and Technology
1 answer:
blondinia [14]4 years ago
6 0

Answer:

True

Explanation:

The variable in the function and the actual variable are one and the same.

You might be interested in
50 POINTS! What is wrong with this python code? The syntax error is on the first line.
nexus9112 [7]

Answer:

This isnt pyton code

Explanation:

7 0
3 years ago
C++Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as fo
fgiga [73]

A program that lets the user play the game of Rock, Paper, Scissors against the computer.

Explanation:

a. When the program begins, the user enters his or her choice of "rock", "paper", or "scissors" at the keyboard using a menu in a function, userChoice, that returns a character.

b. Next, there should be a function, computerChoice, that generates the computer’s play. A random number in the range of 1 through 3 is generated. (NOTE: You’ll have to do some research on how to create random numbers correctly.) 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. The computer’s choice is returned as a character

c. After, a function, determineWinner, will determine the winner between the user’s choice vs. the computer’s choice.The result is selected according to the following rules:

d. Finally, after a result is selected, there should be a function, playAgain, in which the player should have the option of playing again. This should return a boolean.

#include <iostream>

#include <stdlib.h>

int main() {

srand (time(NULL));

int computer = rand() % 3 + 1;

int user = 0;

 std::string roc = "1) Rock\n";

 std::string pap = "2)Paper\n";

 std::string sci = "3) Scissors\n";

std::cout << "rock paper scissors!\n";

std::cout << roc;

std::cout << pap;

std::cout << sci;

std::cout << "Choose: ";

std::cin >> user;

std::cout << "\nYou  choose ";

 switch(user){

   case 1 :

    std::cout << roc;

    break;

   case 2 :

    std::cout << pap;

    break;

   case 3 :

    std::cout << sci;

    break;

   default :

    std::cout << "Invalid Option\n";

 }

std::cout << "Comp choose ";

   switch(computer){

   case 1 :

    std::cout << roc;

    break;

   case 2 :

    std::cout << pap;

    break;

   case 3 :

    std::cout << sci;

    break;

   default :

    std::cout << "Invalid Option\n";

 }

 if(user == computer){

   std::cout << "Draw Game\n";

 }

 else if(user == 1 && computer == 3){

   std::cout << "You Win\n";

 }

 else if(user == 3 && computer == 2){

   std::cout << "You Win\n";

 }

 else if(user == 2 && computer == 1){

   std::cout << "You Win\n";

 }

 else{

   std::cout << "Computer Wins!\n";

 }

 

}

4 0
3 years ago
How do scientists plan on unlocking the secrets to Mars?
zmey [24]
Sending rovers and other explorers I think
3 0
3 years ago
Read 2 more answers
What does the visibility icon allow you to do?
Eva8 [605]

Answer:

it lets you hide the layer

Explanation:

maybe you should go and take some photopea lessons

7 0
4 years ago
which type of classroom enables students to attend lectures without being physically present with the teacher
natka813 [3]
It should be high classed with a interesting pictures so students get attracted to listen
6 0
3 years ago
Other questions:
  • What can be done to improve the security of business uses of the Internet? Give several examples of ecurity measures and technol
    9·1 answer
  • Which of the following refers to the data analysis software and interactive software that allow managers to conduct analyses and
    6·1 answer
  • Which one of the following statements referring to mobile Internet
    5·2 answers
  • A virus that is triggered when certain logical conditions are met, such as opening a file or starting a program a certain number
    10·1 answer
  • If you have defined a class named SavingsAccount with a public static data member named numberOfAccounts, and created a SavingsA
    7·1 answer
  • On the Audio Tools contextual tab, which tab will control how the audio file appears, if it appears, on the slide itself?
    8·2 answers
  • You manage a network that uses switches. In the lobby of your building, there are three RJ45 ports connected to a switch. You wa
    5·1 answer
  • Which computers were the first PCs with a GUI<br> MS-DOS <br> Linux<br> Windows<br> Mac
    7·2 answers
  • Name two devices that use control knobs to set the level of gadget​
    15·1 answer
  • Which number is equivalent to 3e-2?<br><br> 30<br><br> 0.03<br><br> 0.3<br><br> 3
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!