Advanced Placement (AP)

Ask the user how many numbers for which they want to calculate the sum. Using a for loop, prompt the user to enter that many numbers, one-by-one, keeping track of the sum. At the end, after the user entered all numbers, output the sum. Create a variable and assign it the value of 0
Prompt the user for how many numbers they have
With a for loop, set it to repeat enough times to get all their values
Prompt the user for a number
Add that number to the variable that started as 0
Output to the user, the sum of all values

answer
Answers: 2

Other questions on the subject: Advanced Placement (AP)

image
Advanced Placement (AP), 25.06.2019 02:00, connermichaela
98 points! include an answer and in advance!
Answers: 1
image
Advanced Placement (AP), 25.06.2019 19:00, aidy3259
Which of the following characterize the historical move toward urbanization? i. increase in pollution ii. increase in frequency of natural disasters iii. increase in incidence of infectious disease a. i b. ii c. i and ii d. i and iii e. i, ii and iii
Answers: 1
image
Advanced Placement (AP), 25.06.2019 23:00, idalieramirez8517
Use the conversion factors to rewrite the distances in different, but equivalent, units. celestial objects distance from the star object a 0.000001877 pc object b 30.06 au object c 778.3 million km
Answers: 1
image
Advanced Placement (AP), 26.06.2019 05:30, icecreamisgood4u
Coal combustion produces which of the following waste products? i. tar ii. methane iii. electricity i only ii only i and ii ii and iii i, ii, and iii
Answers: 1
Do you know the correct answer?
Ask the user how many numbers for which they want to calculate the sum. Using a for loop, prompt the...

Questions in other subjects:

Konu
Spanish, 21.01.2021 23:40
Konu
Biology, 21.01.2021 23:40
Konu
Chemistry, 21.01.2021 23:40
Konu
Mathematics, 21.01.2021 23:40