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 veganMenuCount = Integer.parseInt(scanner.nextLine());
- double chickenMenuPrice = 10.35;
- double fishMenuPrice = 12.40;
- double veganMenuPrice = 8.15;
- double delivery = 2.50;
- double menuPrice = chickenMenuCount * chickenMenuPrice + fishMenuCount * fishMenuPrice + veganMenuCount * veganMenuPrice;
- double dessertPrice = menuPrice / 5;
- double totalPrice = menuPrice + dessertPrice + delivery;
- System.out.println(totalPrice);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement