Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace SmallShop
- {
- using System;
- class SmallShop
- {
- static void Main()
- {
- var product = Console.ReadLine().ToLower();
- var town = Console.ReadLine().ToLower();
- var 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.2 * quantity);
- }
- else if (product == "sweets")
- {
- Console.WriteLine(1.45 * quantity);
- }
- else if (product == "peanuts")
- {
- Console.WriteLine(1.6 * quantity);
- }
- }
- else if (town == "plovdiv")
- {
- if (product == "coffee")
- {
- Console.WriteLine(0.4 * quantity);
- }
- else if (product == "water")
- {
- Console.WriteLine(0.7 * quantity);
- }
- else if (product == "beer")
- {
- Console.WriteLine(1.15 * quantity);
- }
- else if (product == "sweets")
- {
- Console.WriteLine(1.30 * quantity);
- }
- else if (product == "peanuts")
- {
- Console.WriteLine(1.5 * quantity);
- }
- }
- else if (town == "varna")
- {
- if (product == "coffee")
- {
- Console.WriteLine(0.45 * quantity);
- }
- else if (product == "water")
- {
- Console.WriteLine(0.7 * quantity);
- }
- else if (product == "beer")
- {
- Console.WriteLine(1.1 * quantity);
- }
- else if (product == "sweets")
- {
- Console.WriteLine(1.35 * quantity);
- }
- else if (product == "peanuts")
- {
- Console.WriteLine(1.55 * quantity);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement