Professional Documents
Culture Documents
Psuedocode HELP
Psuedocode HELP
Psuedocode is actully a program design technique. We design a program in order to anticipate the logic
and programming.
Psuedcode also has syntaxes and symantics but the rules are easier to understand and
programmer-friendly. It helps the programmer and/or other people to easily understand the complex
programming logic.
Psuedocode Syntaxes: (Remember syntaxes (Keywords) are always written in upper case.)
1. Sequence:
DO
END DO
E.g.
DO
END DO
E.g.
DO
END DO
2. Selection Construct:
if()..else
if()..else if()...else
switch()
if()..else
IF <condition>
DO
Statements in descriptive way.
END DO
ELSE IF <Condition>
DO
Statements in descriptive way.
END DO
END IF
E.g.
IF the car is on rent
DO
DISPLAY message informing the user that car is not available.
END DO
ELSE
DO
..
..
END DO
END IF
3. Iteration Construct:
a) WHILE <condition>
DO
..
..
END DO
END WHILE
b) REPEAT
DO
..
..
END DO
UNTILL <condition>