int i = 5;
int j = 3;
int k;
double a, b;
k = j / 2 * i / 10;
a = 0.1 * i * j / 2.0;
b = 0.1 * (j / i) + 3.0;
So by doing it by hand one would get k=0.75, a=0.75, and b=3.06. Yet when I solve it in Visual Studio I get 0, 0.75, and 3.00. I was hoping someone could shed light on this. I know int means only whole values can be output but why is b = 3.00 rather than 3.06 since b is a double?