SHARE
TWEET

Untitled

a guest Apr 21st, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import.java.util.Scanner;
  2.  
  3. public class Main {
  4.         public static void main (Sting [ ] args) {
  5.         Scanner scanner = new Scanner (System.in);
  6.            
  7.          int tablesNumber = Integer.parseInt (scanner.nextLine());
  8.          double tablesLength = Double.parseDouble(scanner.nextLine());
  9.          double tablesWidth = Double.parseDouble(scanner.nextLine());
  10.  
  11. double clothesArea = tablesNumber * (tablesLenght + 2 * 0.30) *  (tablesWidth + 2 * 0.30);
  12.  
  13. double squareArea = tablesNumber * (tablesLength / 2) * (tablesLength / 2);
  14.  
  15. double priceUSD = clothesArea * 7 + squareArea * 9;
  16.  
  17. double priceBGN = priceUSD * 1.85;
  18.  
  19. System.out.printf ("%.2f USD %n", priceUSD);
  20. System.out.printf ("%.2f BGN", priceBGN);
  21.  
  22. }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top