Advertisement
GabrielHr00

07. Food Delivery

Mar 10th, 2024
598
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class FoodDelivery {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int chickenMenuCount = Integer.parseInt(scanner.nextLine());
  7.         int fishMenuCount = Integer.parseInt(scanner.nextLine());
  8.         int vegetarianMenuCount = Integer.parseInt(scanner.nextLine());
  9.  
  10.         double totalSum = (chickenMenuCount * 10.35) + (fishMenuCount * 12.40) + (vegetarianMenuCount * 8.15);
  11.         double dessertPrice = totalSum * 0.20;
  12.  
  13.         double finalPrice = totalSum + dessertPrice + 2.50;
  14.         System.out.println(finalPrice);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement