Advertisement
deyanivanov966

04. Vegetable Market

Apr 8th, 2021
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class T13 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         Double P1 = Double.parseDouble(scanner.nextLine());
  8.         Double P2 = Double.parseDouble(scanner.nextLine());
  9.         Double P3 = Double.parseDouble(scanner.nextLine());
  10.         Double P4 = Double.parseDouble(scanner.nextLine());
  11.  
  12.         Double W1 = (P1 * P3) / 1.94;
  13.         Double W2 = (P2 * P4) / 1.94;
  14.         Double W3 = W1 + W2;
  15.         System.out.printf("%.2f", W3);
  16.  
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement