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 higher the astm grain-size number, the coarser the grain is. a)-true b)-false
Answers: 3
question
Engineering, 04.07.2019 18:10
Ahot wire operates at a temperature of 200°c while the air temperature is 20°c. the hot wire element is a tungsten wire of 5 um diameter and 2 mm in length. plot using excel current, heat transfer and heat generated by the wire for air velocity varying from 1-10 m/s in steps of lm/s? matlab the sensor voltage output, resistance, or assume nu 0.989 re033pr13 take air properties at tr (200°c20°c)/2 = 110°c properties of tungsten: c 0.13 kj/kg.k 3 p 19250 kg/m k (thermal conductivity) = 174 w/m.k
Answers: 2
question
Engineering, 04.07.2019 19:20
Acommercial grade cubical freezer, 4 m on a side, has a composite wall consisting of an exterior sheet of 5.0-mm thick plain carbon steel (kst= 60.5 w/m k), an intermediate layer of 100-mm thick polyurethane insulation (kins 0.02 w/m k), and an inner sheet of 5.0- mm thick aluminium alloy (kal polyurethane insulation and both metallic sheets are each characterized by a thermal contact resistance of r 2.5 x 104 m2 k/w. (a) what is the steady-state cooling load that must be maintained by the refrigerator under conditions for which the outer and inner surface temperatures are 25°c and -5°c, respectively? (b) for power saving purpose, which wall material should be increased/reduced in. thickness in order to reduce 50% of the cooling load found in part (a)? redesign the thickness of the proposed material. 177 w/m-k). adhesive interfaces between the q=575.93 w
Answers: 2
question
Engineering, 06.07.2019 02:30
A75mm diameter shaft is supported in a journal bearing 75mm long with a diametral clearance of 0. 1mm. it supports a radial load of 1000 n and is lubricated with sae 50 oil at 70°c. find the friction torque and the power loss when the crankshaft rotates at 2900 rev/min.
Answers: 1
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
Mathematics, 19.02.2020 15:53
question
Mathematics, 19.02.2020 15:54
question
Mathematics, 19.02.2020 15:54
question
Mathematics, 19.02.2020 15:54
question
Physics, 19.02.2020 15:58
Questions on the website: 13722362