+ 14

how to do modulus operator

I haven’t learned the modulus operator yet, can anyone explain it?

27th Jan 2019, 12:37 AM
toto
toto - avatar
3 Answers
+ 8
It's a math operation that gets the remainder of 2 numbers after division. E.g. 5 % 2 = 1 5 / 2 = 2 remainder 1
27th Jan 2019, 1:12 AM
Lambda_Driver
Lambda_Driver - avatar
0
% Modulus operator it'd used to calculate remaining.
20th Feb 2020, 9:55 PM
Maduchandan B P