While trying to compile the codes uploaded I keep having this error which I couldn't understand!
% operator is used to perform binary operation on integer or integer-like operands. It is used like this:
int i,j; input i , j i = i % j; print i
What you are trying to achieve is something similar to this:
double i,j; input i , j i = i % j; print i
The problem is what do expect it to output when dealing with floating point numbers? For eg.
54.66 % 1.02 gives no sense. And that's what the error says,
invalid operands to binary expression.