0% found this document useful (0 votes)
100 views

ALGORITHM 2 DP

The algorithm accepts an applicant's name, gross salary, salary deductions, spouse's salary, spouse's salary deductions, total monthly expenses, and total monthly repayments. It first calculates the applicant's net income and checks if it meets the minimum qualifying salary for the housing community. If qualified, it then calculates the applicant's remaining balance after expenses and repayments and checks if it is above half the net income. If both criteria are met, the applicant is approved. Otherwise, the application is not approved. The algorithm outputs whether the application is approved or not approved at the end.

Uploaded by

Dexter Jj Pellew
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

ALGORITHM 2 DP

The algorithm accepts an applicant's name, gross salary, salary deductions, spouse's salary, spouse's salary deductions, total monthly expenses, and total monthly repayments. It first calculates the applicant's net income and checks if it meets the minimum qualifying salary for the housing community. If qualified, it then calculates the applicant's remaining balance after expenses and repayments and checks if it is above half the net income. If both criteria are met, the applicant is approved. Otherwise, the application is not approved. The algorithm outputs whether the application is approved or not approved at the end.

Uploaded by

Dexter Jj Pellew
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

QUESTION:

Develop an algorithm or write pseudocode to 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 salary 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 and repayments not exceed half of the
balance.

ALGORITHM NAME: HOUSING CONSTRUCTION Corp _Program

This program is designed to state whether an applicant is eligible for any of the homes in a named
housing community.

Variables used

Appname: string

Appsal, asalded, ssal, ssalded, TME, TMR, netinc, GiNC, Balance: REAL

START

Print ‘You are applying for CLARENDON COURT'

Print 'What is your name?'

Read (appname)

Print 'What is your salary?'

Read (appsal)

Print 'What is your salary deductions'

Read (asalded)

Print 'What is your spouse salary'

Read (ssal)

Print 'What is your spouse salary deduction'

Read (ssalded)

GiNC= (appsal + ssal)

Print 'Your Gross Income is $’, GiNC

Netinc = (appsal-asalded) +(ssal-ssalded)

Print 'Your Net Income is $’, netinc


If netinc>= comcost then

Print 'You are qualified for Clarendon Court'

else

Print 'Not Qualified'

Print 'What is your total monthly expenses?'

read (TME)

Print 'What is your total monthly repayments?'

Read (TMR)

balance =netinc-(TME+TMR)

Print 'Your Balance is $’, Balance

If balance>=1/2*netinc

then

Print 'Approved'

else

Print 'Not Approved'

Print 'THANK YOU FOR USING HOUSING CONSTRUCTION Corp.'

STOP

You might also like