velikova_olya

vegetable

Jan 22nd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. package SimpleCalcExams;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class VegetableMarket {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. double priceVegetables = Double.parseDouble(scanner.nextLine());
  10. double priceFruits = Double.parseDouble(scanner.nextLine());
  11. double kilosVegetables = Double.parseDouble(scanner.nextLine());
  12. double kilosFruits = Double.parseDouble(scanner.nextLine());
  13.  
  14. double totalIncomeBGN = priceFruits * kilosFruits + priceVegetables * kilosVegetables;
  15. double totalIncomeEUR = totalIncomeBGN / 1.94;
  16.  
  17. System.out.println(totalIncomeEUR);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment