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