Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (litersFuel >= 20 && litersFuel <= 25) {
- double discount = fuelPrice * 0.08;
- fuelPrice = fuelPrice - discount;
- }else if (litersFuel > 25) {
- double discount = fuelPrice * 0.10;
- fuelPrice = fuelPrice - discount;
- }else {
- fuelPrice = fuelPrice;
- }
- double endPriceOfFuel = fuelPrice * litersFuel;
- System.out.printf("%.2f lv.", endPriceOfFuel);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement