+ 1

What means %

x=15 y=6 x%y x-?

13th Feb 2021, 11:44 PM
Andrew Ponomarëv
Andrew Ponomarëv - avatar
4 Réponses
+ 8
% is the modulo operator. For example: 15%6 is equal to 3 How: 3 is the remainder of 15 divided by 6 The easiest way to do it will be like this: to count how many 6 in 15 which is 2 so => 2*6 is 12 and 15-12=3 So, 15%6=3 I hope this helps!
14th Feb 2021, 12:06 AM
Abdulaziz Al-Shehhi
Abdulaziz Al-Shehhi - avatar
+ 1
Thanks man
14th Feb 2021, 12:08 AM
Andrew Ponomarëv
Andrew Ponomarëv - avatar
0
Do for 18%7
28th Sep 2021, 8:26 AM
Ian Chelimo
Ian Chelimo - avatar
0
Ian Chelimo 18%7=4 There is only two 7 in 18 so: 18-(2*7)= 18-14 = 4 4 is the remainder
28th Sep 2021, 10:01 PM
Abdulaziz Al-Shehhi
Abdulaziz Al-Shehhi - avatar