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