Hello all, I have my assignment topic and I know what information I would like to include in my assignment. Can anyone tell me how to put my data into top-down format? Here is what I have thus far:

I'm trying to design a program that will input ages of active duty Navy personnel and then finds the average age of active duty Navy members.


TOPIC- Average age of active duty Navy personnel


Input-current age of personnel
Output- average age of personnel
Subtasks:
UserAges-Input from 50 personnel
AverageAge-Compute average age
Determine average age
Output results

Are you looking for c++ code or pseudocode?

declare three integers, one for age, one for sum of ages, and third for number of ages entered.

in a loop
    prompt for age
    update sum
    update counter
end of loop
average age is sum divided by counter

Are you looking for c++ code or pseudocode?

declare three integers, one for age, one for sum of ages, and third for number of ages entered.

in a loop
    prompt for age
    update sum
    update counter
end of loop
average age is sum divided by counter

Thanks for replying, is this the top-down design format?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.