Question: ```
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?

Answer: 
All of your variables should be `double` because if they are `int` integer operation will occur and your result will not contain decimal places.

```
double i = 5;
double j = 3;
double k;
double a, b;

k = j / 2 * i / 10;
a = 0.1 * i * j / 2.0;
b = 0.1 * (j / i) + 3.0;

```
since `j` and `i` are integers, `j/i` will result in integer `0`.

Integer division only gives the quotient and the remainder is discarded. E.g `10/4 equals to 2`