Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class P05BirthdayParty {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int priceRentalHall = Integer.parseInt(scanner.nextLine());
- double priceCake = priceRentalHall * 0.20;
- double priceDrinks = priceCake - (priceCake * 0.45);
- double priceAnimator = priceRentalHall / 3.0;
- double sum = priceRentalHall + priceCake + priceDrinks + priceAnimator;
- System.out.printf("%.1f", sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement