Simple Math, type 'double' returns 0 instead of correct result... I'm at a COMPLETE LOSS HERE!!! HELP! o_O

 

Can anyone make sense of this?

      double calc1, calc2;
      calc1 = 1000*(17.6/100);
      calc2 = calc1*(65/100);
      Alert("calc2=",DoubleToStr(calc2,2));

Here is what's returned:

Alert result

How is this possible???


Also tried this:

      double calc2;
      calc2 = 176*(65/100);
      Alert("calc2=",DoubleToStr(calc2,2));

The output once again:

Alert no.2


What the hell????!!!!?!?!?! o_O
 
Okay nevermind, I figured it out... apparently when you type in '65' it sees it as 'int' type... so you need to type it as '65.0'
Reason: