Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design a program that will allow a user to Input a list of your family members a

ID: 641813 • Letter: D

Question

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 lives in Texas.

There are 4 components of your submission including:

Note: The Program Description and Analysis were most likely delivered last week. Please resubmit those with any modifications based on the grade and feedback from the professor. Im trying to write program but don't understand how to call functions with arrays!

Explanation / Answer

#include <stdio.h>

int main(void)
{
/*Define variables*/
char famName;
char nameDatabase[50];   //character string for inputting family member name
char famState;  
char stateDatabase[50];   //character string to enter state
int famAge;
int ageDatabase[50];   //array to input ages
int i;   //to initiate For loop
int count;   //to end For loop and divide by number of ages to get average
int sum;   //to create a sum of numbers in the array to figure average
float average;   //to print average age of family

/*set initial values*/
i = 1;
count = 1;
sum = 0;

/*Run for loop to cycle through each family member*/
printf("Enter a family member

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote