Advertisement
bpavlov123bp

Vegetable Market

Apr 3rd, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using System;
  2.  
  3. namespace VegetableMarket
  4. {
  5. class Program
  6. {
  7. public static void Main(string[] args)
  8. {
  9. var vegetablePrice = double.Parse(Console.ReadLine());
  10. var fruitPrice = double.Parse(Console.ReadLine());
  11. var vegetableQuantity = int.Parse(Console.ReadLine());
  12. var fruitQuantity = int.Parse(Console.ReadLine());
  13. double totalCostVegetable = vegetablePrice * (double)vegetableQuantity;
  14. double totalCostFruit = fruitPrice * (double)fruitQuantity;
  15. double totalAmount = totalCostVegetable + totalCostFruit;
  16. double totalAmountEuro = totalAmount / 1.94;
  17. Console.WriteLine(totalAmountEuro);
  18. Console.Write("Press any key to continue . . . ");
  19. Console.ReadKey(true);
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement