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
yawa3891 [41]
4 years ago
12

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less

than 100. End each prompt with a newline. Ex: For the user input 123, 395, 25, the expected output is:
Enter a number (<100):
Enter a number (<100):
Enter a number (<100):
Your number < 100 is: 25
c++

#include
using namespace std;

int main() {
int userInput = 0;

do
cout << "Your number < 100 is: " << userInput << endl;

return 0;
}
Engineering
1 answer:
chubhunter [2.5K]4 years ago
8 0

Answer:

#include <iostream>//including iostream library to use functions such as cout and cin

using namespace std;

int main() {

int userInput = 0;

do

{

 cout << "Enter a number < 100: " ;

 cin >> userInput;

 if (userInput < 100)//condition if number is less than 100

 {

  cout << "Your number < 100 is: " << userInput << endl;

 }

} while (userInput > 100);//do while loop condition

return 0;

}

Explanation:

A do-while loop executes regardless in the first iteration. Once it has run through the first iteration, it checks if the condition is being met. If, the condition is TRUE, the loop begins the second iteration. If FALSE, the loop exits. In this case, the condition is the userInput. after the first iteration, lets say the userInput is 120, the condition userInput > 100 is true.Therefore, the loop will run again until eventually the number is less than hundred, lets say 25. In that case the condition would be 25 > 100, which would be false, so the loops will break.

You might be interested in
Question 2 (Multiple Choice Worth 3 points)
ololo11 [35]

Answer:

the car to the right

Explanation:

its in the name the RIGHT of way hope it helps good luck

6 0
3 years ago
64A geothermal pump is used to pump brine whose density is 1050 kg/m3at a rate of 0.3 m3/s from a depth of 200 m. For a pump eff
grin007 [14]

Answer:

835,175.68W

Explanation:

Calculation to determine the required power input to the pump

First step is to calculate the power needed

Using this formula

P=V*p*g*h

Where,

P represent power

V represent Volume flow rate =0.3 m³/s

p represent brine density=1050 kg/m³

g represent gravity=9.81m/s²

h represent height=200m

Let plug in the formula

P=0.3 m³/s *1050 kg/m³*9.81m/s² *200m

P=618,030 W

Now let calculate the required power input to the pump

Using this formula

Required power input=P/μ

Where,

P represent power=618,030 W

μ represent pump efficiency=74%

Let plug in the formula

Required power input=618,030W/0.74

Required power input=835,175.68W

Therefore the required power input to the pump will be 835,175.68W

5 0
3 years ago
A house is losing heat at a rate of 1700 kJ/h per °C temperature difference between the indoor and the outdoor temperatures. Exp
Furkat [3]

Answer:

1700kJ/h.K

944.4kJ/h.R

944.4kJ/h.°F

Explanation:

Conversions for different temperature units are below:

1K = 1°C + 273K

1R = T(K) * 1.8

= (1°C + 273) * 1.8

1°F = (1°C * 1.8) + 32

Q/delta T = 1700kJ/h.°C

T (K) = 1700kJ/h.°C

= 1700kJ/K

T (R) = 1700kJ/h.°C

= 1700kJ/h.°C * 1°C/1.8R

= 944.4kJ/h.R

T (°F) = 1700kJ/h.°C

= 1700kJ/h.°C * 1°C/1.8°F

= 944.4kJ/h.°F

Note that arithmetic operations like subtraction and addition of values do not change or affect the value of a change in temperature (delta T) hence, the arithmetic operations are not reflected in the conversion. Illustration: 5°C - 3°C

= 2°C

(273+5) - (273+3)

= 2 K

5 0
4 years ago
The fins attached to a surface are determined to have an effectiveness of 0.9. Do the rate of heat transfer from the surface dec
Nesterboy [21]

Answer: The rate of heat transfer decreases.

Explanation:

Fin effectiveness is defined as the ratio of heat transfer rate from a  finned surface to the heat transfer rate from the same surface if there were no fins.  Its  value is expected to be greater than 1.

Having effectiveness  value of 0.9  which is less than 1 indicates that the heat transfer rate will decrease since a fin effectiveness smaller than 1 shows that the  fin acts as insulation (thermal insulation).

8 0
3 years ago
Select the correct answer.
boyakko [2]
I think the answer is b
6 0
3 years ago
Read 2 more answers
Other questions:
  • The evaporator section of a refrigeration unit consists of thin-walled, 10-mm-diameter tubes through which refrigerant passes at
    7·1 answer
  • A fluid flows steadily through a pipe with a uniform cross sectional area. The density of the fluid decreases to half its initia
    6·1 answer
  • Water (cp = 4180 J/kg·°C) enters the 2.5 cm internal diameter tube of a double-pipe counter-flow heat exchanger at 17°C at a rat
    7·1 answer
  • A solid steel shaft has to transmit 100 kW at 160 RPM. Taking allowable shear stress at 70 Mpa, find the suitable diameter of th
    15·1 answer
  • What is your employer required to have on fixed ladders that extend more than 24 feet in the workplace?
    15·2 answers
  • If a person runs a distance of 0.7 km in 3 min, what is his average speed in kilometres/hour ​
    7·1 answer
  • Multiply. Write the answer in simplest form. 1 3/10×1/8
    12·1 answer
  • Drivers must be careful when driving close to cyclists and should keep at least ___ feet apart when passing cyclists on the road
    15·1 answer
  • The section of the area to be examined is shown circumscribed by broken lines with circles at
    13·1 answer
  • During delivery of a 2023 ariya equipped with propilot assist 2. 0, what should you point out to your customers about the turn s
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!