I just wanted to calculate the VAT, but when i divide by 100 to obtain the total price (price*VAT/100), but it returns me 0.0. Here\'s my code:
a.pri
At least on of division operands must be float or double so the result is double. Otherwise the division result is integer.
a.total=a.precio*a.iva/100.0
or if you really need float, you can skip some precision
a.total=(float)(a.precio*a.iva/100.0)