Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class EasterLunch {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int cake = Integer.parseInt(scanner.nextLine());
- int eggs = Integer.parseInt(scanner.nextLine());
- int sweets = Integer.parseInt(scanner.nextLine());
- double cakePrice = cake * 3.20;
- double eggsNum = eggs * 4.35;
- double sweetsPrice = sweets * 5.40;
- double eggsPaint = eggs * 12 * 0.15;
- double count = cakePrice + eggsNum + sweetsPrice + eggsPaint;
- System.out.printf("%.2f",count);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement