Guest User

Untitled

a guest
Apr 21st, 2019
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Vegetable {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. double priceVeg = Double.parseDouble(scanner.nextLine());
  7. double priceFru = Double.parseDouble(scanner.nextLine());
  8. int kgVeg = Integer.parseInt(scanner.nextLine());
  9. int kgFru = Integer.parseInt(scanner.nextLine());
  10.  
  11. double result = (priceVeg * kgVeg) + (priceFru * kgFru);
  12.  
  13. System.out.println(result / 1.94);
  14. }
  15. }
RAW Paste Data