Advertisement
16112

1.1 Учебна зала

Dec 16th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. package kursova_rabota;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class edno_edno {
  6.  
  7.     public static void main(String[] args) {
  8.         // TODO Auto-generated method stub
  9.         Scanner sc = new Scanner(System.in);
  10.         double length = Double.parseDouble(sc.nextLine());
  11.         double width = Double.parseDouble(sc.nextLine());
  12.         double cols = Math.floor((width - 1) / 0.7);
  13.         double rows = Math.floor(length / 1.2);
  14.         double seats = (cols * rows) - 3;
  15.         System.out.format("%.0f", seats);
  16.     }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement