Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace VegetableMarket
- {
- class Program
- {
- public static void Main(string[] args)
- {
- var vegetablePrice = double.Parse(Console.ReadLine());
- var fruitPrice = double.Parse(Console.ReadLine());
- var vegetableQuantity = int.Parse(Console.ReadLine());
- var fruitQuantity = int.Parse(Console.ReadLine());
- double totalCostVegetable = vegetablePrice * (double)vegetableQuantity;
- double totalCostFruit = fruitPrice * (double)fruitQuantity;
- double totalAmount = totalCostVegetable + totalCostFruit;
- double totalAmountEuro = totalAmount / 1.94;
- Console.WriteLine(totalAmountEuro);
- Console.Write("Press any key to continue . . . ");
- Console.ReadKey(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement