This:
gives as output 33.0. Isn't it supposed to output 33.3333...?
Am I missing something?
Printable View
This:
gives as output 33.0. Isn't it supposed to output 33.3333...?
Am I missing something?
The expression to the right of the = does integer math: 100/3 gives 33 and that is converted to a double.
To do floating pt math change one of the numbers to a double: 100.0/3