integer division

closed account (Ebf21hU5)
What is the formula you would use for integer division in type double?
Also what formula would you use for modulus? I tried fmod(Op1,Op2) but it wouldn't work in type double.
int x = 10;
int y = 3;

x = x / y;

double x = 10.0;
double y = 3.0;

x = x / y;

int x = 10;
int y = 3;

x = x % y;

double x = 10.0;
double y = 3.0;

x = fmod( ( long Double )x, ( long double )y );
Topic archived. No new replies allowed.