+ 1

Can someone enlighten me, what is modulus?

31st Aug 2016, 1:33 PM
kelvin
8 Answers
+ 5
returns the remainder when divided: 10%3 = 1 12%4 = 0 23%5= 3 etc
31st Aug 2016, 7:48 PM
Frank Gunsch
Frank Gunsch - avatar
+ 1
the modules operator(%) is most often been confused with the division (/) operator (%) operator returns the remainder when divided 7%2=1 whereas (/) operator returns the quotient when divided 7%2=3
9th Sep 2016, 7:11 PM
Prakhar
Prakhar - avatar
+ 1
See my "% Modulus explained" code to understand in a way, you may have learnt at school https://code.sololearn.com/c2fRl6x893E7/?ref=app
31st Dec 2016, 12:44 PM
Vishal++
Vishal++ - avatar
+ 1
Thanks
10th Mar 2017, 7:35 PM
kelvin
0
modulus returns us the remainder 14%4= 2
2nd Sep 2016, 3:02 PM
Kalai Vanan
Kalai Vanan - avatar
0
%
6th Sep 2016, 4:13 AM
Nafiys
Nafiys - avatar
0
Tank You for explanation!
11th Sep 2016, 7:49 PM
Ruan Faustino Camello Da Silva
Ruan Faustino Camello Da Silva - avatar
0
nice. very good ans
21st Sep 2016, 4:38 PM
Talha Saleem
Talha Saleem - avatar