Advertisement
GabrielHr00

08. Basketball Equipment

Mar 10th, 2024
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 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 annualFee = Integer.parseInt(scanner.nextLine());
  7.  
  8.         double shoesPrice = annualFee - (annualFee * 0.40);
  9.         // double shoesPrice = annualFee * 0.60;
  10.         double setPrice = shoesPrice - (shoesPrice * 0.20);
  11.         // double setPrice = shoesPrice * 0.80;
  12.         double ballPrice = setPrice * 1/4;
  13.         double accPrice = ballPrice * 1/5 ;
  14.  
  15.         double finalSum = annualFee + shoesPrice + setPrice + ballPrice + accPrice;
  16.         System.out.println(finalSum);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement