subject

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

ansver
Answers: 2

Other questions on the subject: Advanced Placement (AP)

image
Advanced Placement (AP), 22.06.2019 11:00, caliharris123
Kate is 14 years old and just started taking dance classes with her friends at a local dance studio. this is her first time in a dance program, so everything is new to her. her friends convinced her to join the class since they have been enjoying it for a few months. how could the following terms her succeed in the dance class? ● secondary reinforcement ● identity vs. role confusion ● observational learning how could the following terms hinder her success in the class? ● circadian rhythm ● basal ganglia ● vestibular sense
Answers: 2
image
Advanced Placement (AP), 26.06.2019 10:00, vanessabeausoleil
Why is the color green callled green?
Answers: 2
image
Advanced Placement (AP), 26.06.2019 22:30, prelogical
After a heavy rainstorm vegetation on a hillslope was completely removed. how will this removal of vegetation affect the relative amounts of infilitration and runoff that occur during the next heavy rainstorm.
Answers: 1
image
Advanced Placement (AP), 29.06.2019 03:30, peytenyoung
1: in which of the following countries is sharia law likely to be a cultural value? a) mexicob) australia c) iraqd) united statese) argentina2: which of the following is a visitor likely to see in poland? a) many women wearing sarisb) signs in russianc) government controlled shopsd) a roman catholic churche) soldiers arresting opposition party leaders.
Answers: 2
You know the right 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: