Financial Assistance Application Create the Financial Assistance Application. A non-governmental organization needs your application to calculate the amount of financial assistance for needy families. The formula is as follows: • If the annual household income is between $30,000 and $40,000 and the house- hold has at least three children, the amount is $1,000 per child. • If the annual household income is between $20,000 and $30,000 and the house- hold has at least two children, the amount is $1,500 per child. • If the annual household income is less than $20,000, the amount is $2,000 per child. Implement a function for this computation. The program asks for the household income and number of children for each applicant, printing the amount returned by your function. Use -1 as a sentinel value for the input. The program output should be formatted as shown in the Sample Run. Note: You must use at least one function in your code.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Financial Assistance Application
Create the Financial Assistance Application. A non-governmental organization
needs your application to calculate the amount of financial assistance for needy
families. The formula is as follows:
• If the annual household income is between $30,000 and $40,000 and the house-
hold has at least three children, the amount is $1,000 per child.
• If the annual household income is between $20,000 and $30,000 and the house-
hold has at least two children, the amount is $1,500 per child.
• If the annual household income is less than $20,000, the amount is $2,000 per
child.
Implement a function for this computation. The program asks for the household
income and number of children for each applicant, printing the amount returned
by your function. Use -1 as a sentinel value for the input. The program output
should be formatted as shown in the Sample Run.
Note: You must use at least one function in your code.
Transcribed Image Text:Financial Assistance Application Create the Financial Assistance Application. A non-governmental organization needs your application to calculate the amount of financial assistance for needy families. The formula is as follows: • If the annual household income is between $30,000 and $40,000 and the house- hold has at least three children, the amount is $1,000 per child. • If the annual household income is between $20,000 and $30,000 and the house- hold has at least two children, the amount is $1,500 per child. • If the annual household income is less than $20,000, the amount is $2,000 per child. Implement a function for this computation. The program asks for the household income and number of children for each applicant, printing the amount returned by your function. Use -1 as a sentinel value for the input. The program output should be formatted as shown in the Sample Run. Note: You must use at least one function in your code.
SAMPLE RUN
What is the household income (-1 to quit)? 30000
How many children? 3
The assistance amount is $4500.00.
What is the household income (-1 to quit)? 20000
How many children? 2
The assistance amount is $3000.00.
What is the household income (-1 to quit)? 35000
How many children? 1
The assistance amount is $0.00.
What is the household income (-1 to quit)? -1
What is the household income (-1 to quit)? 105000
How many children? 3
The assistance amount is $0.00.
What is the household income (-1 to quit)? 10000
How many children? 1
The assistance amount is $2000.00.
What is the household income (-1 to quit)? -1
Transcribed Image Text:SAMPLE RUN What is the household income (-1 to quit)? 30000 How many children? 3 The assistance amount is $4500.00. What is the household income (-1 to quit)? 20000 How many children? 2 The assistance amount is $3000.00. What is the household income (-1 to quit)? 35000 How many children? 1 The assistance amount is $0.00. What is the household income (-1 to quit)? -1 What is the household income (-1 to quit)? 105000 How many children? 3 The assistance amount is $0.00. What is the household income (-1 to quit)? 10000 How many children? 1 The assistance amount is $2000.00. What is the household income (-1 to quit)? -1
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT