Advertisement
veronikaaa86

08. Basketball Equipment

Jan 9th, 2022
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class P08BasketballEquipment {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int yearTax = Integer.parseInt(scanner.nextLine());
  8.  
  9. double priceShoes = yearTax - (yearTax * 0.40);
  10. double priceSuit = priceShoes - (priceShoes * 0.20);
  11. double priceBall = priceSuit / 4;
  12. double priceAcc = priceBall / 5;
  13.  
  14. double totalSum = priceShoes + priceSuit + priceBall + priceAcc + yearTax;
  15.  
  16. System.out.println(totalSum);
  17.  
  18.  
  19. }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement