Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Vegetable {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double priceVeg = Double.parseDouble(scanner.nextLine());
- double priceFru = Double.parseDouble(scanner.nextLine());
- int kgVeg = Integer.parseInt(scanner.nextLine());
- int kgFru = Integer.parseInt(scanner.nextLine());
- double result = (priceVeg * kgVeg) + (priceFru * kgFru);
- System.out.println(result / 1.94);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement