Write an algorithm in pseudocode that finds the average of (n) numbers. For example) (numbers are [4,5,14,20,3,6] ?
Added by Nancy L.
Step 1
Initialize a variable called 'sum' to store the sum of the numbers and set it to 0. Show more…
Show all steps
Your feedback will help us improve your experience
John Incabo and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write an algorithm that returns the sum of the sequence of numbers $s_{1}, \ldots, s_{n}$
Algorithms
Introduction
Draw a flowchart and write pseudocode to calculate the sum and average of four numbers. The average is calculated by dividing the sum of all the numbers by the number of input numbers.
Sarvesh S.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD