# Mathematics and Family Members

916 WordsMar 10, 20134 Pages
Question: Analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array. The specific problem you need to solve for the final project is: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. 2. What is the required output? What is the necessary input? How you will obtain the required output from the given input? Clearly describe variable names and definitions. Include all necessary formulas and…show more content…
Pseudocode Module Main() Declare s_Names as String Array // Array to store names Declare s_Age as Int Array // Array to store ages Declare s_State as String Array // Array to store state of residence Declare i_Count as Int // Variable to hold count of total family members Declare f_avAvg as float // Variable to hold average family age Declare lc as Int // loop counter While (have more family members to enter) // loop to input family data Display “Enter Member Name:” Input s_Names(lc) // Input name Display “Enter Member Age:” Input s_Age(lc) // Input age Display “Enter state” Input s_State(lc) // Input state Increment lc and i_Count End while calcAverageAge(s_Age, i_Count) // Call module to calculate and display average age call printTexans(s_Names, s_State, i_Count) // Print names of Texans End Main Module calcAverageAge(s_Age, i_Count) // Module to calculate average family age Declare f_Avg as float // Variable to hold average age result Declare lc1 as Int // loop