Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SmallShop
- {
- class Program
- {
- static void Main(string[] args)
- {
- string Drink = Console.ReadLine();
- string Town = Console.ReadLine();
- double Quantity = double.Parse(Console.ReadLine());
- double price = 0;
- if (Town == "Sofia" && Drink == "coffee")
- {
- price = Quantity * 0.50;
- }
- else if (Town == "Plovdiv" && Drink == "coffee")
- {
- price = Quantity * 0.40;
- }
- else if (Town == "Varna" && Drink == "coffee")
- {
- price = Quantity * 0.45; ;
- }
- else if (Town == "Sofia" && Drink == "water")
- {
- price = Quantity * 0.80;
- }
- else if (Town == "Plovdiv" || Town == "Varna" && Drink == "water")
- {
- price = Quantity * 0.70;
- }
- else if (Town == "Sofia" && Drink == "beer")
- {
- price = Quantity * 1.20;
- }
- else if (Town == "Plovdiv" && Drink == "beer")
- {
- price = Quantity * 1.15;
- }
- else if (Town == "Varna" && Drink == "beer")
- {
- price = Quantity * 1.10;
- }
- else if (Town == "Sofia" && Drink == "sweets")
- {
- price = Quantity * 1.45;
- }
- else if (Town == "Plovdiv" && Drink == "sweets")
- {
- price = Quantity * 1.30;
- }
- else if (Town == "Varna" && Drink == "sweets")
- {
- price = Quantity * 1.35;
- }
- else if (Town == "Sofia" && Drink == "peanuts")
- {
- price = Quantity * 1.60;
- }
- else if (Town == "Plovdiv" && Drink == "peanuts")
- {
- price = Quantity * 1.50;
- }
- else if (Town == "Varna" && Drink == "peanuts")
- {
- price = Quantity * 1.55;
- }
- Console.WriteLine($"{price:F2}") ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement