galinyotsev123

ProgBasicsExam3and4November2018-E01weddingHall

Dec 30th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class E01weddingHall {
  4.  
  5. public static void main (String[]args) {
  6. Scanner scanner = new Scanner(System.in);
  7. double length = Double.parseDouble(scanner.nextLine());
  8. double width = Double.parseDouble(scanner.nextLine());
  9. double sideBar = Double.parseDouble(scanner.nextLine());
  10.  
  11.  
  12. double Room = length * width;
  13. double Bar = sideBar * sideBar;
  14. double Dancing = Room * 0.19;
  15. double SpaceAvailable = (Room - Bar - Dancing) / 3.2;
  16.  
  17.  
  18.  
  19. System.out.printf("%.0f", Math.ceil(SpaceAvailable));
  20.  
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment