0% found this document useful (0 votes)
5 views8 pages

Programming

The program determines if an applicant qualifies for housing allocation based on their net salary and expenses. It calculates the net salary by subtracting deductions from gross salary and checks if it exceeds the qualifying salary. Approval is granted if the sum of expenses and repayments does not exceed half of the remaining balance after deductions.

Uploaded by

tamoyataylor12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views8 pages

Programming

The program determines if an applicant qualifies for housing allocation based on their net salary and expenses. It calculates the net salary by subtracting deductions from gross salary and checks if it exceeds the qualifying salary. Approval is granted if the sum of expenses and repayments does not exceed half of the remaining balance after deductions.

Uploaded by

tamoyataylor12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Problem Statement

This program will determine whether an applicant is approved for allocation of a home in a named housing
community. The algorithm/pseudocode should accept the name of the applicant and his/her gross salary as well as
deductions. The net salary should be calculated. An applicant qualifies if the net salary is above the qualifying salary
for that housing community. The algorithm should then determine whether the applicant is approved. Approval is
granted should the sum of applicant’s expenses the repayments not exceed half of the balance.

Algorithm
START

DECLARATION OF VARIABLE:
applicant_name AS STRING ← ""
gross_salary, deductions, expenses, repayments, qualifying_salary AS REAL ← 0.0
net_salary, balance AS REAL ← 0.0
no_of_applicant AS INTEGER ← 0

PRINT "Please enter the number of person you wish to check: "
READ no_of_applicant

WHILE no_of_applicant > 0 DO


PRINT "Enter the name of the applicant: "
READ applicant_name

PRINT "Enter the gross salary of the applicant: "


READ gross_salary

PRINT "Enter the salary deductions: "


READ deductions

PRINT "Enter the applicant's expenses: "


READ expenses

PRINT "Enter the applicant's repayments: "


READ repayments

PRINT "Enter the qualifying salary for the housing community: "
READ qualifying_salary

net_salary ← gross_salary - deductions


balance ← net_salary - (expenses + repayments)

IF net_salary < qualifying_salary THEN


PRINT applicant_name, "does not qualify based on net salary."
END-IF

IF expenses + repayments > (0.5 * balance) THEN


PRINT applicant_name, "is NOT approved due to exceeding half of the balance."
ELSE
PRINT applicant_name, "is APPROVED for housing allocation."
END-IF

no_of_applicant=no_of_applicant-1

END-WHILE
STOP

You might also like