It works, but you have to turn them into floats like you did in your method. But hey the more methods the better.
Quote:
Originally Posted by ot_207
When you use 50 and 100 simply without dots the compiler uses them as integers.
So basically when you do this
50/100 you will do a integer division and the result will be 0
To fix the float problem you need all the numbers to have dots in order to count as floats.
In your situation the code should be:
(50.0/100.0)*100.0
|