SHARE
TWEET

Untitled

a guest Apr 21st, 2019 84 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
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top