Course contents · Problem book

Integer arithmetic

Open the practice in the trainer →

Two functions solve almost every problem about digits, even/odd numbers and unit conversion:

INT(x)integer part (rounds down): INT(472/100) = 4
MOD(x, d)remainder of division: MOD(472, 10) = 2

Digits of a three-digit number: hundreds — INT(n/100), tens — INT(MOD(n,100)/10), units — MOD(n,10). A number is even if MOD(n,2)=0.

Tasks in the trainer

  1. In B2:B6 extract the hundreds digit.
  2. In C2:C6 — the tens digit.
  3. In D2:D6 — the units digit.
  4. In E2:E6 — the sum of the digits.
  5. In F2:F6 return “even” or “odd”.

Solve the tasks in the trainer →