Advertisement
veronikaaa86

01. Oscars ceremony

Aug 14th, 2021
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package examPreparation;
  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 hallRent = Integer.parseInt(scanner.nextLine());
  10.  
  11. double statuette = hallRent * 0.7;
  12. double catering = statuette * 0.85;
  13. double sound = catering / 2;
  14.  
  15. double expenses = statuette + catering + sound + hallRent;
  16.  
  17. System.out.printf("%.2f", expenses);
  18.  
  19. }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement