Arithmetic operators in Cambridge pseudocode
Arithmetic operators: + - * / calculate with numbers, and / gives a real result. DIV gives the whole-number quotient and MOD the remainder, so 17 DIV 5 is 3 and 17 MOD 5 is 2.
Understanding Arithmetic operators in Cambridge pseudocode in IGCSE Computer Science Paper 2
What it does: / always gives a real (decimal) answer, so Result holds 3.5, not 3. Brackets are worked out first: (2 + 3) is 5 and 5 * 4 is 20. Without brackets, 2 + 3 * 4 would be 14. DIV gives the whole-number quotient. 5 goes into 17 three times, so 17 DIV 5 is 3. The remainder 2 comes from MOD. MOD gives the remainder after dividing. 17 - 15 = 2, so 17 MOD 5 is 2. Multiplication happens before addition: 3 * 4 = 12, then 12 + 2 = 14. Brackets set the order. (2 + 3) * 4 = 5 * 4 = 20. The other one is 2 + 12 = 14.
Common mistakes: DIV gives the whole-number quotient (3). The remainder is found with MOD, so the line should be Rem ← Num MOD 5, which gives 2. MOD gives the remainder (15), not the number of whole hours. Whole hours need DIV: Hours ← Minutes DIV 60, which gives 2.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 265–274) and word search (Modules 254–274).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
+ - * / DIV MODFill in the Blanks
Spot the Error
Student with a class code? Join your class →