Why can't use {double d=40; d%=4;} returns err. How to work around this, since I need use double?

Lin Xie
89
Lin Xie  

'%' - remainder operator is to be applied to integer values only

So, change it to {int d=40, d%=4;}.

JC
1674
JC  
diostar:
Thx.
Er, just use MathMod()? d = MathMod(d, 4)
blackmore
434
blackmore  
jjc:
Er, just use MathMod()? d = MathMod(d, 4)

Thx!