Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double yearlyMembership = Double.parseDouble(scanner.nextLine());
- double snickers = yearlyMembership * 0.60;
- double outfit = snickers * 0.80;
- double ball = outfit / 4;
- double accessories = ball / 5;
- double sum = yearlyMembership + snickers + outfit + ball + accessories;
- System.out.printf("%.2f", sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement