Core syntax
Use DECLARE, assignment, INPUT, OUTPUT, comments, constants, and typed values in a consistent exam-style format.
- Assignment uses <-
- Variables use explicit types
- Comments start with //
manual
Syntax, control flow, and tracing habits in one place. Keep it open beside the editor while you build.
Use DECLARE, assignment, INPUT, OUTPUT, comments, constants, and typed values in a consistent exam-style format.
Pick IF, CASE, FOR, WHILE, or REPEAT UNTIL based on when the condition is known and when it should be tested.
Represent list-style data with indexed arrays, then process values through counted loops and clear bounds.
Use trace tables, line-by-line state changes, and compiler diagnostics to catch logic and syntax errors earlier.
examples
DECLARE Number : INTEGER
DECLARE Total : INTEGER
Total <- 0
FOR Number <- 1 TO 5
Total <- Total + Number
NEXT Number
OUTPUT "Total = ", TotalDECLARE Choice : INTEGER
REPEAT
OUTPUT "Choose 1 to 4"
INPUT Choice
UNTIL Choice >= 1 AND Choice <= 4
OUTPUT "Accepted"before you submit
Treat the manual as a working checklist, not a long rules page. Write the algorithm, run it, then trace the parts that change state.