0

does modulus operation ever give fraction values as output?

30th Jan 2017, 7:21 AM
Suptajoy Barua
Suptajoy Barua - avatar
2 ответов
+ 2
The "%" operator works on integers and returns an integer value. If you want to compute the modulus on doubles, please have a look at function fmod().
30th Jan 2017, 7:25 AM
Álvaro
0
no, the modulus operator only returns an integer which is the remainder of the division
12th Feb 2017, 9:58 PM
Iannah Paul Imoter
Iannah Paul Imoter - avatar