Programming Maths

Topic Progress

Simple Maths

The Maths symbols below should be easy to remember, you just need to remember that on the computer multiplication is a *    and divide is a   /

More Complicated Maths

We’ll look in more detail at MOD, DIV and Exponential as these are probably new to you

Mod

This gives you the remainder of a division. Lets look at some examples:

12/3 =4 remainder 0             MOD = 0

15/ 2 = 7 remainder 1            MOD = 1

33/5 = 6 remainder 3            MOD = 3

DIV

Is integer division. There can’t be a fraction or decimal. Lets look at some examples:

12/ 4 = 3  remainder  0          DIV = 3

17/5 = 3 remainder 2              DIV = 3

28/10 = 2 remainder 8           DIV = 2

55/2 = 25 remainder 5            DIV = 25

Quiz