c - This code of mine is showing floating point error.. can anyone please exlain -
#include<stdio.h> void main() { float = 5, b = 2; int c; c = % b; printf("%d", c); }
i getting floating point error n program-me..
please explain this..
the operands of operator %
have integral (i.e. int
, byte
, ...). have cast float
s first:
c = ((int)a) % ((int) b);
Comments
Post a Comment