Explore BrainMass

Pseudo-code and Program to Calculate Average

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Declare Num1, Num2, and Num3 as integers
Declare Average as real
Write "Welcome to the program. Enter 3 positive numbers",
INPUT Num1, Num2, Num3
Average = (Num1 + Num2 +Num3) / 3
Write "The average of three numbers entered is", Average

1. List all variable name(s) used in this program
2. List each prompt that is used in this program.
3. Show what the PC monitor will show when the program is executed with the following values used: 27, 12, and 15.
4. Write a new program in pseudo-code, it should input-and calculate the average of 5 numbers entered.

© BrainMass Inc. brainmass.com October 24, 2018, 7:00 pm ad1c9bdddf

Solution Preview

1. Variables are placeholders for your data. You have explicitly declared them in your program.
They are: Num1, Num2, Num3, Average

2. Prompt is made for user input. There seems to be just one.
INPUT Num1, Num2, Num3

3. The PC ...

Solution Summary

Learn how to identify variables and write pseudo-code for a program to calculate average of 5 real numbers

See Also This Related BrainMass Solution

Flowchart and Pseudocode for Grade Average Program

Design a grade average program that will produce the numerical grade average of test scores input by a user.

The program design should address the following issues:
- Use an Array as the data structure to store the input grades.
- Use a Looping structure to initialize the elements of this array to clear out system garbage.
- The user may input up to 5 test scores.
Hint: This does not mean each user will input 5 scores. 3 scores may be entered for calculation.
- Use a Looping structure to traverse the elements of the array to produce your calculation.

Give the flowchart and pseudocode for the program.

View Full Posting Details