Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Task1 {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int kozunak = Integer.parseInt(scanner.nextLine());
  8. int eggsKora = Integer.parseInt(scanner.nextLine());
  9. int cookiesKg = Integer.parseInt(scanner.nextLine());
  10.  
  11. double kozunakPrice = kozunak * 3.20;
  12. double eggsPrice = eggsKora * 4.35;
  13. double cookiesPrice = cookiesKg * 5.40;
  14. double eggsPaint = eggsKora * 12 * 0.15;
  15.  
  16. double sum = kozunakPrice + eggsPrice + cookiesPrice +eggsPaint;
  17.  
  18. System.out.printf ("%.2f", sum);
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement