Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp15
- {
- class Program
- {
- static void Main(string[] args)
- {
- string product =
- Console.ReadLine().ToLower();
- string town =
- Console.ReadLine().ToLower();
- double quantity = double.Parse(
- Console.ReadLine());
- if(town == "sofia")
- {
- if(product =="coffee")
- Console.WriteLine(0.50 * quantity);
- else if(product =="water")
- Console.WriteLine(0.80 * quantity);
- else if(product =="beer")
- Console.WriteLine(1.20 * quantity);
- else if(product =="sweets")
- Console.WriteLine(1.45 * quantity);
- else if(product == "peanuts")
- Console.WriteLine(1.60 * quantity);
- }
- if(town == "plovdiv")
- {
- if(product == "coffee")
- Console.WriteLine(quantity * 0.40);
- else if(product =="water")
- Console.WriteLine(quantity * 0.70);
- else if(product == "beer")
- Console.WriteLine(quantity * 1.15);
- else if(product == "sweets")
- Console.WriteLine(quantity * 1.30);
- else if(product == "peanuts")
- Console.WriteLine(quantity * 1.50);
- }
- if (town == "varna")
- {
- if(product == "coffee")
- Console.WriteLine(quantity * 0.45);
- else if(product == "water")
- Console.WriteLine(quantity * 0.70);
- else if(product == "beer")
- Console.WriteLine(quantity * 1.10);
- else if(product == "sweets")
- Console.WriteLine(quantity * 1.35);
- else if(product == "peanuts")
- Console.WriteLine(quantity * 1.55);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment