# I'm going crazy!

46

```double za = 100*67/750, zb = 100*142/250;
```

The program shows me: za = 8.00 and zb = 56.00

instead my calculator displays: za = 8.93 and zb = 56.80

Why? Why? Why? Why? Why?

379

GarZed9:

. . .

Why? Why? Why? Why? Why?

You are performing math operations on integers, and only after the operations are complete, the integer is cast to a double. See Typecasting.

Just use a double in the calculation.

Try:

```double za = 100*67/750.0, zb = 100*142/250.0;

(Notice that I used 750.0 instead of 750 and 250.0 instead of 250)

16112

GarZed9:
`double za = 100*67/750, zb = 100*142/250;`

The program shows me: za = 8.00 and zb = 56.00

On MT4 v434, division quotient don't give floating point values(Bug??) - MQL4 forum
46

Thirteen:

You are performing math operations on integers, and only after the operations are complete, the integer is cast to a double. See Typecasting.

Just use a double in the calculation.

Try:

(Notice that I used 750.0 instead of 750 and 250.0 instead of 250)

Really thanks to all!