Can someone please help me out with this program? Im stump on figuring out where
ID: 3546240 • Letter: C
Question
Can someone please help me out with this program? Im stump on figuring out where to start
The results of a survey of the households in your township are available for public scrutiny. Each record contains data for one household, including a four-digit integer identification number, the annual income for the house-hold, and the number of household members. Write a program to read the survey results into three arrays and perform the following analyses.
a. Count the number of households included in survey and prints a three-column table displaying the data. (Assume that no more than 25 households were surveyed.) display a table
b. Calculate the average household income, and list the identification number and income of each household that exceeds the average. display a table, find average
c. Determine the percentage of households that have incomes below the poverty level. Compute the poverty level income using the formula. p=$6500+$750*(m-2) where m is the number of members of each household. This formula shows that the poverty level depends on the number of family members, m, and that the poverty-level income increases as m gets larger. Test your program on the following data.
Identification Number Annual Income Household Members
1041 12,180 4
1062 13,240 3
1327 19,800 2
1483 22,458 8
1900 17,000 2
2112 18,125 7
2345 15,623 2
3210 3,200 6
3600 6,500 5
3601 11,970 2
4724 8,900 3
6217 10,000 2
9280 6,200 1
"Must be in 1 data file"
Explanation / Answer
#include #include #include using namespace std; struct Household { int idNumber; int income; int members; }; char again; int main() { do { Household house1 = {1041, 12180, 4}; Household house2 = {1062, 13240, 3}; Household house3 = {1327, 19800, 2}; Household house4 = {1483, 22458, 8}; Household house5 = {1900, 22458, 2}; Household house6 = {2112, 17000, 7}; Household house7 = {2345, 18125, 2}; Household house8 = {3210, 15623, 6}; Household house9 = {3600, 3200, 5}; Household house10 = {3601, 6500, 2}; Household house11 = {4724, 11970, 2}; Household house12 = {6217, 8900, 2}; Household house13 = {9280, 6200, 1}; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.