0

How could the 56%3 is equall to 2

%

1st Feb 2017, 11:29 AM
Ali
Ali - avatar
3 odpowiedzi
+ 5
Floating division of 56 by 3 is equal to 18.666... Entire part, or integer division of 56 by 3 is equal to 18. 18 multiply by 3 is equal to 54. Reminder of integer division is equal to 56 - 54 == 2... % ( tell 'modulo' ) is operator to calculate rest of integer division ^^
1st Feb 2017, 11:37 AM
visph
visph - avatar
+ 1
oo yeh I got it .. thanks aloot
1st Feb 2017, 11:49 AM
Ali
Ali - avatar
0
% outputs the rest of a division For example 28%5 --> Outputs 3 Because 3 is the rest that can't be divided by 5.
7th Feb 2017, 7:55 AM
Noah Lambert