- 1
Why it doesn't divide the number so I shall get discount?
2 Réponses
+ 1
double discount = minIndex1/100; is an int division that's why it equals 0.
add a decimal to the division, there are many ways to get a double division, here's one:
double discount = minIndex1/100.0;
+ 1
I understand thanks a lot.