Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.30 KB | None | 0 0
  1. import org.w3c.dom.ls.LSOutput;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class toyStore {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.         double excursionPrice = Double.parseDouble(scanner.nextLine());
  9.          int puzzleCount = Integer.parseInt(scanner.nextLine());
  10.          int talkingDollCount = Integer.parseInt(scanner.nextLine());
  11.          int teddyBearCunt = Integer.parseInt(scanner.nextLine());
  12.          int minionCount = Integer.parseInt(scanner.nextLine());
  13.          int truckCount = Integer.parseInt(scanner.nextLine());
  14.  
  15.          double puzzleTotalPrice = puzzleCount * 2.60;
  16.          double talkingDollTotalPrice = talkingDollCount * 3;
  17.          double teddyBearTotalPrice =  teddyBearCunt * 4.10;
  18.          double minionsTotalPRice = minionCount * 8.20;
  19.          double truckTotalPrice = truckCount * 2;
  20.  
  21.          double totalPrice = puzzleTotalPrice + talkingDollTotalPrice + teddyBearTotalPrice + minionsTotalPRice + truckTotalPrice;
  22.          double totalToyCount = puzzleCount + talkingDollCount + teddyBearCunt + minionCount + truckCount;
  23.  
  24.          if(totalToyCount >= 50){
  25.              totalPrice = totalPrice * 0.75;
  26.  
  27.          }
  28.     }    double finalPrice = totalPrice * 0.9;
  29.           if (finalPrice >= excursionPrice)
  30.  
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement