Engineering
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 ").

answer
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 16:10, TheOriginalMeyah
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
image
Engineering, 04.07.2019 18:10, sarahgrindstaff123
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
image
Engineering, 04.07.2019 19:10, pedropaulofpedrosapp
Tom is having a problem with his washing machine. he notices that the machine vibrates violently at a frequency of 1500 rpm due to an unknown rotating unbalance. the machine is mounted on 4 springs each having a stiffness of 10 kn/m. tom wishes to add an undamped vibration absorber attached by a spring under the machine the machine working frequency ranges between 800 rpm to 2000 rpm and its total mass while loaded is assumed to be 80 kg a) what should be the mass of the absorber added to the machine so that the natural frequency falls outside the working range? b) after a first trial of an absorber using a mass of 35 kg, the amplitude of the oscillation was found to be 10 cm. what is the value of the rotating unbalance? c) using me-3.5 kg. m, find the optimal absorber (by minimizing its mass). what would be the amplitude of the oscillation of the absorber?
Answers: 3
image
Engineering, 04.07.2019 19:10, juneham
Estimate the change in specific internal energy au and specific enthalpy h from inlet to outlet for ethylene glycol (a liquid) flowing through each of the following devices: (a) a heat exchanger where the glycol temperature increases from 20 °c to 80 °c; (b) a pump operating at about 25 °c and increasing the glycol pressure from 100 kpa to 8 mpa.
Answers: 2
Do you know the correct answer?
At the beginning of the program, you ask the user how many numbers he or she wants to add. In the wh...

Questions in other subjects:

Konu
Mathematics, 15.07.2019 17:30
Konu
Mathematics, 15.07.2019 17:30
Konu
Mathematics, 15.07.2019 17:30
Konu
Mathematics, 15.07.2019 17:30