i am trying to run this code in java
double health = ((level*level +10000) * (level/150)/6) +100;
and it always come out as 100 (or whatever the last number is) in this instance level = 1 but even replacing the variable level with the number 1 wont fix this. when done right the answer should equal approximately 110 . please help me fix this code so i can continue programming
i have already tried breaking the line up into multiple separate lines of code, but still no fix. granted, this uses some pretty big fractions but it worked before and not all of a sudden it has stopped working. please help me to fix this problem,
thanks in advance.