Advertisement
galinyotsev123

ProgBasicsExam9and10March2019-E01BasketballEquipment

Mar 11th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. double yearlyMembership = Double.parseDouble(scanner.nextLine());
  8.  
  9. double snickers = yearlyMembership * 0.60;
  10. double outfit = snickers * 0.80;
  11. double ball = outfit / 4;
  12. double accessories = ball / 5;
  13. double sum = yearlyMembership + snickers + outfit + ball + accessories;
  14.  
  15. System.out.printf("%.2f", sum);
  16.  
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement