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