Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Borsa {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- double VegetablesCost = Double.parseDouble(scan.nextLine());
- double FruitCost = Double.parseDouble(scan.nextLine());
- double VegetablesWeight = Double.parseDouble(scan.nextLine());
- double FruitWeight = Double.parseDouble(scan.nextLine());
- double result =((VegetablesCost*VegetablesWeight) + (FruitCost*FruitWeight)) / 1.94;
- System.out.printf("%f", result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement