Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class ShivashkiTzeh {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int bpm = Integer.parseInt(scanner.nextLine());
  7.         double lentBpm = Double.parseDouble(scanner.nextLine());
  8.         double weighBpm = Double.parseDouble(scanner.nextLine());
  9.         double areaOfCovers = bpm * (lentBpm + 2* 0.30) * (weighBpm + 2*0.30);
  10.         double areaOfCar = bpm * (lentBpm/2) * (lentBpm/2);
  11.         double priseUSD = areaOfCovers * 7 + areaOfCar * 9;
  12.         double priseLv = priseUSD * 1.85;
  13.         System.out.printf("%.2f USD%n%.2f BGN",priseUSD,priseLv );
  14.  
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement