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
horrorfan [7]
3 years ago
12

Compose a C++ function named getSpeed that uses a reference parameter variable named speed to accept an integer argument. The fu

nction should prompt the user to enter a number in the range of 20 through 70. The value entered by the user should be validated and stored in the parameter variable. Set the parameter variable to zero if the user enters a number outside the range of 20 through 70. void getSpeed (int &speed) { Cout << “Enter a number in the range between 20 and 70” << endl; Cin>>speed; If ( speed <=20 || speed >= 70) Speed = 0; }
Computers and Technology
1 answer:
Inessa [10]3 years ago
3 0

// Making the function

void getSpeed(int &speed){

// initialize the variable to take input

int input =0;

cout << " Enter the Number in range of 20 through 70 : "<<;

cin>>input;

// validate the input

if(input>=20 && input<=70)

 speed = input;

else

 speed = 0;

}

You might be interested in
An agile team used planning poker to estimate user stories. After all team members read a user story, the facilitator asks every
Natali [406]

Answer:

The answer is "Option B"

Explanation:

In the given-choices, the only option B is correct because by reassessing instantly, the team loses is its advantage of debating its projections and how it chose those assessments, and the wrong choice can be defined as follows:

  • In choice A, Mostly as a unit for the projections, respondents should not use the ideal days.  
  • In choice C, Whenever the procedure should've been anonymous, no cards were released.
  • In choice D, Its mediator was incorrect and the laws were followed.
4 0
3 years ago
Add an array, which will store the most recent 5 recent transactions. For the array, add an insert function which will store the
Vika [28.1K]

The answer & explanation for this question is given in the attachment below.

Download docx
4 0
3 years ago
Input a number and find the square root only if the number entered is greater than or equal to zero.
Svetradugi [14.3K]

number = float(input("Enter a number: "))

if number >= 0:

   print(number**0.5)

I hope this helps!

5 0
3 years ago
What is a short example of public domain?
ikadub [295]
Something that isn't subject to copyright.
6 0
3 years ago
What are minimum computer requirements for a software program?
Bumek [7]
<span><span>Operating system: Windows 2000/XP
</span><span>CPU: Pentium 4 1.5 GHz or Athlon XP 1500+ processor or higher
</span><span>Memory: 384 MB RAM</span></span>
8 0
4 years ago
Other questions:
  • Identify which portion of the below host IP addresses are invalid and explain why it is invalid. Hint: If you aren't sure, conve
    12·1 answer
  • Which of these jobs would be most appropriate for someone who majors in computer engineering? I need the answer ASAP Helping com
    14·2 answers
  • What do you call when a hacker users multiple guest computers to crack a password?
    11·1 answer
  • The following pseudocode is an example of ____.do stepAdo stepBif conditionC is true thendo stepDelsedo stepEendifwhile conditio
    15·1 answer
  • Another name for the office button menu is the toolbar. true or false.
    7·2 answers
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    6·1 answer
  • Which of the following players is on offence
    9·1 answer
  • The internet's data gathways rely on what kind of hardware devies to route data to its destination?
    14·1 answer
  • Which of the following is an example of metadata about a webpage?
    7·2 answers
  • Please help i have 15 mins
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!