Advertisement
veronikaaa86

01. Oscars ceremony

Aug 13th, 2022
986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. package examPrep;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P01OscarsCeremony {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int rent = Integer.parseInt(scanner.nextLine());
  10.  
  11.         double statuesPrice = rent * 0.7;
  12.         double cateringPrice = statuesPrice * 0.85;
  13.         double soundPrice = cateringPrice / 2;
  14.  
  15.         double totalPrice = statuesPrice + cateringPrice + soundPrice + rent;
  16.  
  17.         System.out.printf("%.2f", totalPrice);
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement