subject
Engineering, 06.11.2020 01:00 jprofaci29

At the beginning of the program, you ask the user how many numbers he or she wants to add. In the while-block, you prompt the user for the numbers to add. Here are the requirements:

Make the first statement the prompt to the user asking how many numbers to add. Assign that information to a variable called numbers_to_add.

Initialize the sum to 0.

Initialize the counter to 1.

Write a while-loop that runs while the counter is less than or equal to the number of numbers the user intends to enter.

In the while-block, prompt the user for the first number to add and assign it to a variable called number.

Add the number to the existing sum (which, the first time through, is 0).

Increment the counter by one.

Print out the sum ("The sum is ").

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
The flow rate of air through a through a pipe is 0.02 m5/s. a pitot static tube is placed in the flow. the radius of the pitot static tube is 1 mm. assuming the flow to be steady and the air to be at 300k, calculate the difference in total and static pressure if the diameter of the pipe is: (a) d 0.1 m d 0.05 m (c) d 0.01 m
Answers: 2
question
Engineering, 04.07.2019 18:20
Have a greater impact on maintenance productivity than any other support group. (clo5) a)-the top management b)-inventory and purchasing c)-sub-contracting d)-cmms
Answers: 2
question
Engineering, 04.07.2019 18:20
Water vapor initially at 10 bar and 400 °c is contained within a piston-cylinder assembly. the water lost heat to the surrounding according to isochoric (iso-volumetric) process until its temperature is 150 °c. the water is then condensed isothermally to saturated liquid. for the water as a system, calculate the work in kj/kg
Answers: 2
question
Engineering, 04.07.2019 19:10
For a process taking place in a closed system containing gas, the volume and pressure relationship is pvi-constant. -1.5 bar, the process starts with initial conditions, pi = =0.03 m3 and ends with final volume, v2-0.05 m3 determine the work done by the gas.
Answers: 2
You know the right answer?
At the beginning of the program, you ask the user how many numbers he or she wants to add. In the wh...
Questions
question
Business, 14.07.2021 22:10
question
Mathematics, 14.07.2021 22:10
question
Mathematics, 14.07.2021 22:10
question
Advanced Placement (AP), 14.07.2021 22:10
question
Business, 14.07.2021 22:10
Questions on the website: 13722361