Advertisement
Ivakis

Zelenchukova Borsa

Aug 8th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Borsa {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner scan = new Scanner(System.in);
  8.  
  9. double VegetablesCost = Double.parseDouble(scan.nextLine());
  10. double FruitCost = Double.parseDouble(scan.nextLine());
  11.  
  12. double VegetablesWeight = Double.parseDouble(scan.nextLine());
  13. double FruitWeight = Double.parseDouble(scan.nextLine());
  14.  
  15. double result =((VegetablesCost*VegetablesWeight) + (FruitCost*FruitWeight)) / 1.94;
  16.  
  17. System.out.printf("%f", result);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement