0
Can somebody make this program in java?
A shopkeeper offers 30% discount on purchasing articles whereas the other shopkeeper two successive discounts of 20% and 10% for purchasing the same article. Write a program in java to compute and display which is better offer for coustomer. Take the price of an article as the input.
4 odpowiedzi
+ 8
I'll give you a hint.
"30% discount" means, you multiply the price by (1 - 0.3) = 0.7.
"20%, then 10% discount" means, you multiply the price by (1 - 0.2) * (1 - 0.1) = 0.8 * 0.9 = 0.72.
(This means that the 30% discount is always better.)
0
Buddy I have this logic but I need the syntax of loop to be used here.
0
Why do you need a loop?
0
Lol, You're of those programmers, who make problems - solvung problem is "costy"...