{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab 6 Team 4 Algorithm part 2

# Lab 6 Team 4 Algorithm part 2 - Age of Mothers = Age of...

This preview shows page 1. Sign up to view the full content.

Lab 6 – Part 2 Group 4 Variables: Read file Number of Children (Integer) Family Income (Integer) Age of Mothers (Integer) Age of Fathers (Integer) Total Households (Integer) Total Mothers (Integer) Total Fathers (Integer) Counter Age Holder (Integer) Gender Holder (Char) Number of Children Holder (Integer) Family Income Holder (Integer) Average Number of Children in Household (Integer) Average Family Income (Integer) Average Age of Mothers (Integer) Average Age of Fathers (Integer) Calculations: Do While not at end of file For counter 1 to 5 Read a line Age Holder = read a line Gender Holder = read a line If Gender Holder = “M” Then
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Age of Mothers = Age of Mothers + Age Holder Number of Mothers = Number of Mothers + 1 Else Age of Fathers = Age of Fathers + Age Holder Number of Fathers = Number of Fathers + 1 Number of Children = Number of Children + read a line Family Income = Family Income + read a line Read a line Loop Average Number of Children in Household = Number of Children Holder / Total Households Average Family Income = Family Income Holder / Total Households Average Age of Mothers = Age of Mothers / Total Mothers Average Age of Fathers = Age of Fathers / Total Fathers...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online