Main.cc: In function 'int main(int, char**)': Main.cc:10:7: error: invalid operands of types 'double' and 'double' to binary 'operator%' if(c%b!=0){ ^