0

I'm trying to design a program that will input ages of 50 active duty Navy personnel and then finds the average age of current active duty Navy members. Here is my current pseudocode, could anyone tell me if there are errors?

Declare age[50] as integer
Declare Sum, Average as float
Declare I as integer
Set Sum = 0
For (I = 0; I < 50; I++)
Write “Enter age of Active Duty Navy personnel” (I+1)
Input Age[I]
Set sum = sum + Age[I]
End For
Set Average = Sum/50
For (I = 0; I < 50; I++)
Write “Age of User” + (I+1) + “ is “ Age[I]
End For
Write “The current average age of Active Duty navy personnel is ” + Average

Edited by __avd: Added [code] tags. Encase your code in: [code] and [/code] tags.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by firstPerson
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.