+ 2

Modulo Issue.

What happens when the number in front of the modulo is higher than the number behind it. If i put it in a program and compile it. It prints the number in the front of the modulo. But why?

29th Aug 2017, 8:56 PM
BitScrypt
BitScrypt - avatar
5 Respostas
+ 6
modulo should give you the remainder. for example, 5%2 would be 1.
29th Aug 2017, 9:50 PM
hamletmun
hamletmun - avatar
+ 2
And 2%5 is 2.
29th Aug 2017, 10:35 PM
Stamen
Stamen - avatar
+ 1
Thank you i got this question in a challenge
30th Aug 2017, 5:04 AM
BitScrypt
BitScrypt - avatar
+ 1
Modulo is like Division but you get the rest instead of the real Number. For example: x = 6%5 the output x is 1, not 1.2 because it is the rest
8th Sep 2017, 3:17 PM
BitScrypt
BitScrypt - avatar
0
what is modulo how it work
8th Sep 2017, 2:49 PM
Himanshu Singh Bisht
Himanshu Singh Bisht - avatar