Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.w3c.dom.ls.LSOutput;
- import java.util.Scanner;
- public class toyStore {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double excursionPrice = Double.parseDouble(scanner.nextLine());
- int puzzleCount = Integer.parseInt(scanner.nextLine());
- int talkingDollCount = Integer.parseInt(scanner.nextLine());
- int teddyBearCunt = Integer.parseInt(scanner.nextLine());
- int minionCount = Integer.parseInt(scanner.nextLine());
- int truckCount = Integer.parseInt(scanner.nextLine());
- double puzzleTotalPrice = puzzleCount * 2.60;
- double talkingDollTotalPrice = talkingDollCount * 3;
- double teddyBearTotalPrice = teddyBearCunt * 4.10;
- double minionsTotalPRice = minionCount * 8.20;
- double truckTotalPrice = truckCount * 2;
- double totalPrice = puzzleTotalPrice + talkingDollTotalPrice + teddyBearTotalPrice + minionsTotalPRice + truckTotalPrice;
- double totalToyCount = puzzleCount + talkingDollCount + teddyBearCunt + minionCount + truckCount;
- if(totalToyCount >= 50){
- totalPrice = totalPrice * 0.75;
- }
- } double finalPrice = totalPrice * 0.9;
- if (finalPrice >= excursionPrice)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement