Lompat ke konten

Lesson 61: Clock maths

English

Whole parts and remainders

  • 3725 seconds is not easy to read. 1:02:05 is.
  • DIV gives the whole-number part of a division: 3725 DIV 3600 = 1.
  • MOD gives the remainder: 3725 MOD 60 = 5.
  • In C++, / on two whole numbers is DIV, and % is MOD.

Words for this lesson

Word Meaning
DIV integer division: the whole number of times
MOD the remainder after integer division
library routine a ready-made function of the language

Masuk atau buat akun

IGCSE, A-Level & AP