+ 2

Modulus operator

Is modulus operator just for int data type? How about if I want to use the modulus operator in float or another data type? Thanks for the response.

23rd Sep 2017, 6:08 AM
Afif Humaidi
Afif Humaidi - avatar
4 odpowiedzi
+ 6
float % float gives error invalid operator, same case for double % double. Hth, cmiiw
23rd Sep 2017, 6:23 AM
Ipang
+ 3
Yes float% float gives error
23rd Sep 2017, 6:23 AM
Shivneep Brar
Shivneep Brar - avatar
+ 2
thanks
23rd Sep 2017, 6:28 AM
Afif Humaidi
Afif Humaidi - avatar