Dividing Numbers Question
Why does int hours divide into 2050 but int output divides into 1825?
They're essentially the same right?
1 2 3 4 5 6 7 8 9 10 11
|
int hours = 90 / 0.0439;
cout << hours << endl;
int number1 = 90;
double scalefactor = 0.0493;
int output = number1 / scalefactor;
cout << output << endl;
| |
> They're essentially the same right?
No, the value of the divisor is different (0.0439 in the first case and 0.0493 in the second).
Oh oops...
Thanks!
Topic archived. No new replies allowed.