Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class FoodDelivery {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int chickenMenuCount = Integer.parseInt(scanner.nextLine());
- int fishMenuCount = Integer.parseInt(scanner.nextLine());
- int vegetarianMenuCount = Integer.parseInt(scanner.nextLine());
- double totalSum = (chickenMenuCount * 10.35) + (fishMenuCount * 12.40) + (vegetarianMenuCount * 8.15);
- double dessertPrice = totalSum * 0.20;
- double finalPrice = totalSum + dessertPrice + 2.50;
- System.out.println(finalPrice);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement