POP Unit 1 Pseudocode
POP Unit 1 Pseudocode
Example of pseudocode
START
OUTPUT “enter a no”
INPUT a
OUTPUT “enter second no”
INPUT b
OUTPUT “sum of two no=”, a+b
END
Syntax in Pseudocode
1. IF . . . ENDIF
2. WHILE . . . ENDWHILE
3. FOR . . . ENDFOR
Simple IF
IF condition THEN
---------
---------
ENDIF
IF ELSE
IF condition THEN
---------
---------
ELSE
---------
---------
ENDIF
NESTED IF
IF condition THEN
---------
---------
ELSEIF condition THEN
---------
---------
ELSEIF condition THEN
---------
---------
ELSE
---------
---------
ENDIF
Examples with IF, IF-ELSE, NESTED-IF