ITPEC IP April 2026 Question 8

Source exam: ITPEC IP April 2026Topic: Algorithm and Programming

ITPEC IP April 2026 — Question 8 of 100

Validate the unit, then count the remaining thousands — A is amount mod 1000 ≠ 0, and B is (amount mod 10000) ÷ 1000.

A valid amount must be a multiple of 1,000, so an error is required when the remainder after division by 1,000 is not zero. The number of 10,000 notes is the integer part of amount ÷ 10000. After those notes are removed, amount mod 10000 remains; dividing it by 1,000 gives the number of 1,000 notes.

Answer (c)

Why not others:
- (a) rejects valid multiples of 1,000 because its condition is reversed

- (b) both reverses validation and counts all thousands, including value already represented by 10,000 notes

- (d) validates correctly but its B expression double-counts the 10,000-note portion

Key rule: Use mod to validate divisibility and to isolate the remainder after larger denominations have been taken.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official IP past-paper collection or Report an issue.