Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package vegemarket;
- import java.util.Scanner;
- public class vege {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double VegetablePrice = Double.parseDouble(scanner.nextLine());
- double FruitPrice = Double.parseDouble(scanner.nextLine());
- int VegetablePerKg = scanner.nextInt();
- int FruitPerKg = scanner.nextInt();
- double vegetableTotal = VegetablePrice * VegetablePerKg;
- double fruitTotal = FruitPrice * FruitPerKg;
- System.out.println("Total = " + (vegetableTotal + fruitTotal) / 1.94);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement