how to write a pseudo code?

some one could plz help me Develop an algorithm or write pseudocode to determine whether an applicant is approved for allocation of a home in any 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 balance exceed or equal to half of the net income.PLEASE HELP ME IT FOR MY SBA

Update:

i'm sorry my first time using this and i did try i don't no if its right

Start

PAYE=0.08

UD=0.05

Pen=0.07

HS=2500

Read Y

X=0

While (X<=Y) DO

Read N

Read GI

NI=GI-((GI*DR) + HS)

IF (NI>=130000) then

Status=”Cedar Grove”

Else

IF (NI>= 105000) AND (NI< $130000) THEN

Status=”Maxwell Hills”

Else

IF (NI>=85000) AND (NI<105000) then

Status= “Fairfield”

ELSE

Status = “Not Qualified”

Endif

Endif

Endif

Print “You are qualified for “, status

Read Rep, Exp

Bal = NI- (Rep +Exp)

If (Bal >= (NI/2)) then

Approval =”Yes”

Else

Approval =”No”

Endif

Print N

Print “Housing Community”, Status

Print” Approved:” , Approval

X=X+1

End while

Stop.

Comments

  • The idea of Homework is that YOU do it, it reinforces the concepts and ideas covered in class. The Idea of YA! is that you post when you get stuck not just expect us to do it all for you. Primarily it allows us to see that you have at least made an attempt and we can then structure our responces to match you level of ability.

    So far you have shown no effort on your own behalf so why would we waste our time to 'help' you?

    EDIT

    One of the things about pseudo code is that its closer to human readable english text than code, i.e. you can use long meaningful and descriptive names rather than N, DR, PEN or NI.

    You can also abstract out concepts and data structures in the same way.

    Your attempt is too code like for my liking ( its very hard to read) but does qualify as pseudo code to a degree.

    You have declared values that you don't use, used ones that you don't declare and anyone reading it would have to understand code to make any sense of it. Which defeats the object of pseudo code.

    You have also been 'lazy' in use of case IF and ELSE are capitals yet Endif isnt?

    Looking at the logic behind your attempt there are other issues, How is a Community Name a Status?

Sign In or Register to comment.