problem definition.docx
DESCRIPTION
mehTRANSCRIPT
Accept all the following information
Applicant name
Housing Community
Total expense
Total loan payment
Gross salary
Salary deduction 1
Salary deduction 2
Calculate net income
Test if applicant is qualified for housing community ,they applied for based on their net income
Test if the applicant is approved for housing community they applied for, if balance >=half(0.5)net income
Calculate applicant expenditure
Varname: string
Community: integer
Net salary,qsalary,gross_salary,deductions_1,deductions_2,choice:real t_expense t_payments,t_expenditure,balance:real
Begin
Begin
Display (WELCOME TO PEGGLYN APPROVAL HOUSING
COMMUNITY PROGRAMME);
Display (FOR THIS PROGRAMME TO WORK EFFECTIVELY USERS
MUST ENTER THE);
Display (REQUESTED INFORMATION CORRECTLY);
Display (Sonia Cummings)
Input (Sonia Cummings)
while name = '' do begin0.
Display (John Brown)
Input (John Brown)
Display (Battersea Court)
Display (BATTERSEA COURT [1])
Display (FRAZER VILLLAS [2])
Display (CASCADE GARDENS [3])
Display (HOUSING COMMUNITY)
Input (community)
While (community 1) and (community 2) and
(community3)
Input (choice)
If community = 1 then qsalary = 10000
Else
If community = 2 then qsalary = 7500
Else
qsalary = 5500
Display (Enter Gross Salary $)
Input (gross_salary)
While (gross_salary) < 0
Display (INVALID NUMBER RE-ENTER GROSS SALARY)
Display (Gross Salary $)
Input (gross_salary)
Display (Enter Salary Deduction 1 $)
Input (deduction_1)
Display (Enter Salary Deduction 2 $)
Input (deduction_2)
netsalary = gross_salary-(deduction_1 + deduction_2)
Display ('Net Salary: $',netsalary:6:2)
If (netsalary > qsalary) then
Display (CONGRATULATIONS)
Display (APPLICANT IS QUALIFIED)
Display (TO DETERMINE THE APPROVAL STATUS OF THE APPLICANT
PLEASE ENTER THE FOLLOWING)
Display (TOTAL EXPENSES AND TOTAL LOAN PAYMENT FIGURES)
Display ('TOTAL EXPENSES $)
Input (t_expenses)
Display ('TOTAL LOAN PAYMENT $)
Input (t_payments)
Display (TOTAL LOAN PAYMENTS $, t_payments 6:2)
t_expenditure = t_expenses + t_payments
balance = netsalary - t_expenditure
If t_expenditure > (balance * 0.5)
Display (SORRY)
Display (APPLICANT IS NOT APPROVED)
Else
Display (CONGRATULATIONS)
Display (APPLICANT IS APPROVED)
Else
Display (SORRY)
Display (APPLICANT IS NOT QUALIFIED)
STOP