Cambridge IGCSE Pseudocode Editor & Runner

Cambridge IGCSE Pseudocode Editor & Runner
Write, run and step through pseudocode while watching variables change.
Speed
Ready
Cambridge-style pseudocode Ctrl+Enter Run   F10 Step
Insert Click an operator or keyword to insert it at the cursor.
Output
Press Run to start.
Execution trace
Run or step through your program to see the trace.
365Education IGCSE Pseudocode Editor Runs locally in your browser — no server required

 

Definition of pseudocode

Pseudocode is a structured, plain-language description of an algorithm that outlines program logic using readable English phrases instead of strict coding syntax. By incorporating key control keywords—such as IF, FOR, WHILE, and PROCEDURE—it bridges the gap between human thought and executable code. Free from compiler constraints, pseudocode is ideal for algorithm design, educational study, technical discussions, and exam preparation.

This editor uses the pseudocode conventions of the Cambridge International syllabuses IGCSE Computer Science (0478) and A-Level Computer Science (9618): DECLARE with explicit data type, the assignment arrow, OUTPUT and INPUT, IF…ELSE…ENDIF, CASE OF, FOR…NEXT, WHILE…ENDWHILE, REPEAT…UNTIL, 1-based array indexing, and PROCEDURE/FUNCTION with RETURNS statement. Run the code and walk through it line by line.

 

Cambridge IGCSE / A Level pseudocode:

ConstructSyntaxExample
Declare a variableDECLARE <identifier> : <DATATYPE>DECLARE total : INTEGER
Assignment<identifier> ← <value>total ← 0
OutputOUTPUT <expr1>, <expr2>OUTPUT "Total: ", total
InputINPUT <identifier>INPUT name
Selection (If / Else)

IF <condition> THEN

 

<statements>

 

ELSE

 

<statements>

 

ENDIF

IF n > 5 THEN

 

OUTPUT "High"

 

ENDIF

Multi-way selection

CASE OF <identifier>

 

<value1> : <statements>

 

OTHERWISE <statements>

 

ENDCASE

CASE OF grade

 

'A' : OUTPUT "Pass"

 

ENDCASE

Count-controlled loop

FOR <identifier> ← <start> TO <end> [STEP <step>]

 

<statements>

 

NEXT <identifier>

FOR i ← 1 TO 10

 

OUTPUT i

 

NEXT i

Pre-condition loop

WHILE <condition> DO

 

<statements>

 

ENDWHILE

WHILE n > 0 DO

 

n ← n - 1

 

ENDWHILE

Post-condition loop

REPEAT

 

<statements>

 

UNTIL <condition>

REPEAT

 

n ← n - 1

 

UNTIL n = 0

Procedure (Subroutine)

PROCEDURE <name>(<params>)

 

<statements>

 

ENDPROCEDURE

CALL greet("Ada")
Function (Returns value)

FUNCTION <name>(<params>) RETURNS <DATATYPE>

 

<statements>

 

RETURN <value>

 

ENDFUNCTION

FUNCTION square(n : INTEGER) RETURNS INTEGER

 

RETURN n * n

 

ENDFUNCTION

Comment// <comment text>// swap the values