Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class E01christmasSweets {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double baklavaPrice = Double.parseDouble(scanner.nextLine());
- double muffinPrice = Double.parseDouble(scanner.nextLine());
- double coockiesPrice = 7.50;
- double candysPrice = muffinPrice * 1.8;
- double shtolensPrice = baklavaPrice * 1.6;
- double shtolens = Double.parseDouble(scanner.nextLine());
- double candys= Double.parseDouble(scanner.nextLine());
- double coockies = Double.parseDouble(scanner.nextLine());
- double total = (coockies * coockiesPrice) + (candys * candysPrice) + (shtolens * shtolensPrice);
- System.out.printf("%.2f", total);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment