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]
3 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]3 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
Document the XSS stored exploit script: Use the View Source feature of the web page and create a screenshot of the few lines cod
Natali [406]

Answer:

Hold on let me ask my brother

Explanation:

5 0
3 years ago
I NEED HELP HERE SUM POINTS ( i will report if you put a link and or no answer
Y_Kistochka [10]

Answer:

ok I will help you ha Ha ha ha ha ha ha ha ha ha ha ha

8 0
2 years ago
It is desired to produce and aligned carbon fiber-epoxy matrix composite having a longitudinal tensile strength of 630 MPa. Calc
ratelena [41]

Answer:

The answer is below

Explanation:

Given that:

Diameter (D) = 0.03 mm = 0.00003 m, length (L) = 2.4 mm = 0.0024 m, longitudinal tensile strength (\sigma_{cd})=630\ MPa = 630*10^6\ Pa, Fracture strength

(\sigma_f)=5100\ MPa=5100*10^6\ Pa,fiber-matrix\ stres(\sigma_m)=17.5\ MPa=17.5*10^6\ Pa,matrix\ strength=\tau_c=17\ MPa=17 *10^6\ Pa

a) The critical length (L_c) is given by:

L_c=\sigma_f*(\frac{D}{2*\tau_c} )=5100*10^6*\frac{0.00003}{2*17*10^6}=0.0045\ m=4.5\ mm

The critical length (4.5 mm) is greater than the given length, hence th composite can be produced.

b) The volume fraction (Vf) is gotten from the formula:

\sigma_{cd}=\frac{L*\tau_c}{D}*V_f+\sigma_m(1-V_f)\\\\V_f=\frac{\sigma_{cd}-\sigma_{m}}{\frac{L*\tau_c}{D}-\sigma_{m}}  \\\\Substituting:\\\\V_f=\frac{630*10^6-17.5*10^6}{\frac{0.0024*17*10^6}{0.00003} -17.5*10^6} \\\\V_f=0.456

6 0
3 years ago
16 . You are turning onto a two-lane road divided by a broken yellow line. You know immediately that:
Over [174]

When a person is turning onto a two-lane road divided by a broken yellow line, you know immediately that you are on a two-way road.

<h3>What is the road about?</h3>

Note that a Yellow centerlines can be seen in roads and it is one that is often used to separate traffic moving in different directions.

Note also that Broken lines can be crossed to allow slower-moving traffic and as such, When a person is turning onto a two-lane road divided by a broken yellow line, you know immediately that you are on a two-way road.

See full question below

You are turning onto a two-lane road divided by a broken yellow line. You know immediately that:

Answers

You are on a two-way road.

You are on a one-way road.

The road is under repair.

You must stay to the left of the broken yellow lines.

Learn more about  two-way road from

brainly.com/question/13123201

#SPJ2

5 0
2 years ago
For surface-mounted and pendant-hung luminaires, support rods should be placed so that they extend about ____
7nadin3 [17]

Answer:

One

For surface-mounted and pendant-hung luminaires, support rods should be placed so that they extend about _one___

<h3>what is supported mounted?</h3>
  • A structure that holds up or serves as a foundation for something else. Support is a synonym for mounting.

To learn more about it, refer

to brainly.com/question/25689052

#SPJ4

4 0
2 years ago
Other questions:
  • Does the location of a millimeter change the voltage or current of the circuit?
    7·1 answer
  • A small wind tunnel in a university’s undergraduate fluid flow laboratory has a test section that is 20 in. by 20 in. in cross s
    8·1 answer
  • Two mass streams of the same ideal gas are mixed in a steady-flow chamber while receiving energy by heat transfer from the surro
    11·1 answer
  • If the bolt head and the supporting bracket are made of the same material having a failure shear stress of 'Tra;i = 120 MPa, det
    9·1 answer
  • The beam is supported by a pin at A and a roller at B which has negligible weight and a radius of 15 mm. If the coefficient of s
    7·1 answer
  • The ampere draw of a 5000 watt electric heater used on 120 volts is
    12·1 answer
  • How large a force is required to accelerate a 1300 kg car from rest to a speed of 20 m/s in a distance of 80 m?
    15·2 answers
  • Pls answer and I will give a like!
    8·1 answer
  • 8. What are two ways SpaceX plans to change personal travel?
    7·1 answer
  • Can someone help me LA project pls :((
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!