Advertisement
GabrielHr00

08. Basketball Equipment

May 14th, 2023
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class BasketballEquipment {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int basketballFee = Integer.parseInt(scanner.nextLine());
  7.  
  8.         //double sneakersPrice = basketballFee - (basketballFee * 0.40);
  9.         double sneakersPrice = basketballFee * 0.60;
  10.         //double setPrice = sneakersPrice - (sneakersPrice * 0.20);
  11.         double setPrice = sneakersPrice * 0.80;
  12.         double ballPrice = setPrice * 1/4;
  13.         double accessPrice = ballPrice * 1/5;
  14.  
  15.         double finalPrice = basketballFee + sneakersPrice + setPrice + ballPrice + accessPrice;
  16.  
  17.         System.out.println(finalPrice);
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement