There are four samples below of input/output for A02. Only the last shows error correction.
Return to assignment description
Poverty Rate Program -------------------- This program reads data on family incomes and produces a report on poverty rates among the families. By Mark Young (A00000000) Winter 2021 ...press enter... How many families are there? 10 Enter the income for family #1: 10.0 Enter the income for family #2: 2.0 Enter the income for family #3: 6.0 Enter the income for family #4: 4.0 Enter the income for family #5: 5.0 Enter the income for family #6: 3.0 Enter the income for family #7: 7.0 Enter the income for family #8: 8.0 Enter the income for family #9: 9.0 Enter the income for family #10: 1.0 What is the minimum income required to support a family? 3.0 ...press enter... Report ------ Average Income: $5.5 Basic Needs Income: $3.0 Absolute Poverty Rate: 20.0% Median Income: $5.5 Relative Needs Income: $3.3 Relative Poverty Rate: 30.0% ...press enter...
Poverty Rate Program -------------------- This program reads data on family incomes and produces a report on poverty rates among the families. By Mark Young (A00000000) Winter 2021 ...press enter... How many families are there? 5 Enter the income for family #1: 5000.0 Enter the income for family #2: 15000.0 Enter the income for family #3: 35000.0 Enter the income for family #4: 55000.0 Enter the income for family #5: 95000.0 What is the minimum income required to support a family? 10000.0 ...press enter... Report ------ Average Income: $41000.0 Basic Needs Income: $10000.0 Absolute Poverty Rate: 20.0% Median Income: $35000.0 Relative Needs Income: $21000.0 Relative Poverty Rate: 40.0% ...press enter...
Poverty Rate Program -------------------- This program reads data on family incomes and produces a report on poverty rates among the families. By Mark Young (A00000000) Winter 2021 ...press enter... How many families are there? 4 Enter the income for family #1: 5000.0 Enter the income for family #2: 15000.0 Enter the income for family #3: 35000.0 Enter the income for family #4: 55000.0 What is the minimum income required to support a family? 10000.0 ...press enter... Report ------ Average Income: $27500.0 Basic Needs Income: $10000.0 Absolute Poverty Rate: 25.0% Median Income: $25000.0 Relative Needs Income: $15000.0 Relative Poverty Rate: 25.0% ...press enter...
Poverty Rate Program -------------------- This program reads data on family incomes and produces a report on poverty rates among the families. By Mark Young (A00000000) Winter 2021 ...press enter... How many families are there? -1 There must be at least 2 families. How many families are there? 0 There must be at least 2 families. How many families are there? 1 There must be at least 2 families. How many families are there? 2 Enter the income for family #1: -10.0 The income must be non-negative. Enter the income for family #1: 0.0 Enter the income for family #2: 10000.0 What is the minimum income required to support a family? -500.0 The income must be non-negative. What is the minimum income required to support a family? 500.0 ...press enter... Report ------ Average Income: $5000.0 Basic Needs Income: $500.0 Absolute Poverty Rate: 50.0% Median Income: $5000.0 Relative Needs Income: $3000.0 Relative Poverty Rate: 50.0% ...press enter...