Modulus
In this lesson, we will learn about the modulo operation and how to implement it using recursion.
We'll cover the following
What is the modulo operation?
The modulo operation (abbreviated as mod) returns the remainder when a number is divided by another number. The symbol for mod
is %
.
The number being divided is called the dividend. The number that divides the dividend is called the divisor.
The illustration below represents the concept of remainders using basic division example:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.