In the following, please indent correctly. Use WORD to code the program and subm
ID: 3811858 • Letter: I
Question
In the following, please indent correctly. Use WORD to code the program and submit the file as the answer. Using a FOR loop, show the pseudocode necessary for one program to receive the input of 10 numbers from a user one at a time and, once all those numbers have been input, display the sum of those 10 numbers. HINTs Accumulate the numbers as they are input within the FOR loop; You can store them in an array (although this is not necessary!); It is only necessary to display the sum, not any of the individual numbers.
Explanation / Answer
Algorithm SumOf10Elements():
//No input to this algorithm. Reads input from user, and will just return
//the sum of input numbers.
sum := 0;
for i = 1 : 10
Prompt for input.
Read input to x.
sum := sum + x;
Display 'The sum of entered values is: ', sum
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.