Formula help
I'm trying to create a formula but I'm not getting the right result.
The outcome should be:
0.46
(0.66 - 0.2 = 0.46)
1 2 3 4 5
|
(0.66) - (100 / 500)
0.66 - 100 / 500
double 0.66 - 100 / 500
|
Can anyone help me?
Last edited on
100 / 500 equals zero.
100 is an int and 500 is an int.
In C++, an int divided by an int returns an int, and the value 0.2 cannot be represented as an integer.
Try (0.66) - (100.0 / 500)
Topic archived. No new replies allowed.