Advertisement
Spocoman

Easter Lunch

Sep 5th, 2024
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int easterBreads = Integer.parseInt(scanner.nextLine()),
  7.                 eggPacks = Integer.parseInt(scanner.nextLine()),
  8.                 cookies = Integer.parseInt(scanner.nextLine());
  9.  
  10.         double sum = 3.20 * easterBreads + 4.35 * eggPacks + 5.40 * cookies + 0.15 * 12 * eggPacks;
  11.  
  12.         System.out.printf("%.2f\n", sum);
  13.     }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement