Advertisement
marking2112

Untitled

Jun 4th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import com.sun.org.apache.bcel.internal.classfile.SourceFile;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Workshoptr {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. int tables = Integer.parseInt(scanner.nextLine());
  10. Double tablesLenght = Double.parseDouble(scanner.nextLine());
  11. Double tablesWidth = Double.parseDouble(scanner.nextLine());
  12.  
  13. Double area1 = tables * (tablesLenght + 2 * 0.3) * (tablesWidth + 2 * 0.3);
  14. Double area2 = tables * (tablesLenght / 2) * (tablesLenght / 2);
  15.  
  16. Double result1 = (area1 * 7) + (area2 * 9);
  17. Double result2 = result1 * 1.85;
  18.  
  19. System.out.printf("%.2f%n", result1);
  20. System.out.printf("%.2f", result2);
  21.  
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement