SelectionCoreIGCSE 0478
Pass or fail from a mark
Practice an IF statement in Cambridge IGCSE pseudocode: output Pass or Fail from a single mark.
A test is passed when the mark is 50 or more.
Write pseudocode that reads one integer mark and outputs Pass or Fail.
Your program should
- Declare an INTEGER variable for the mark.
- Use IF ... THEN ... ELSE ... ENDIF.
- Output exactly Pass or Fail.
Sample input
74
Sample output
Pass
Starter
Pseudocode
// Input one mark. Output "Pass" if the mark is 50 or more, otherwise "Fail".
DECLARE Mark : INTEGER