Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class BasketballEquipment {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int annualFee = Integer.parseInt(scanner.nextLine());
- double shoesPrice = annualFee - (annualFee * 0.40);
- // double shoesPrice = annualFee * 0.60;
- double setPrice = shoesPrice - (shoesPrice * 0.20);
- // double setPrice = shoesPrice * 0.80;
- double ballPrice = setPrice * 1/4;
- double accPrice = ballPrice * 1/5 ;
- double finalSum = annualFee + shoesPrice + setPrice + ballPrice + accPrice;
- System.out.println(finalSum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement