Advertisement
MladenKarachanov

AluminumJoinery

Sep 29th, 2023
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.80 KB | None | 0 0
  1. package ProgrammingBasics2;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class AluminumJoinery {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.         int numberOfDogmas = Integer.parseInt(scanner.nextLine());
  9.         String typeOfJoinery = scanner.nextLine();
  10.         String shipmentMethod = scanner.nextLine();
  11.         double discount = 0;
  12.         int price = 0;
  13.         if (typeOfJoinery.equals("90*130")) {
  14.             if (numberOfDogmas > 30) {
  15.                 price = 110;
  16.                 discount = price - (price * 0.05);
  17.             }
  18.             if (numberOfDogmas > 60) {
  19.                 price = 110;
  20.                 discount = price - (price * 0.08);
  21.  
  22.             }
  23.  
  24.         } else if (typeOfJoinery.equals("100*150")) {
  25.             if (numberOfDogmas > 40) {
  26.                 price = 140;
  27.                 discount = price - (price * 0.06);
  28.  
  29.             }
  30.             if (numberOfDogmas > 80) {
  31.                 price = 140;
  32.                 discount = price - (price * 0.10);
  33.  
  34.             }
  35.  
  36.  
  37.         } else if (typeOfJoinery.equals("130*180")) {
  38.             if (numberOfDogmas > 20) {
  39.                 price = 190;
  40.                 discount = price - (price * 0.07);
  41.             }
  42.          if (numberOfDogmas > 50) {
  43.             price = 190;
  44.             discount = price - (price * 0.12);
  45.         }
  46.     }else if (typeOfJoinery.equals("200*300")){
  47.             if (numberOfDogmas >25) {
  48.                 price = 250;
  49.                 discount = price - (price * 0.09);
  50.             }
  51.         }else if (numberOfDogmas > 50){
  52.                 price =250;
  53.                 discount = price-(price*0.14);
  54.             }
  55.  
  56.         if (numberOfDogmas <= 10) {
  57.             System.out.println("Invalid order");
  58.  
  59.  
  60.  
  61.         }
  62.     }
  63. }
  64. //НЕ Е РЕШЕНА
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement