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 SmallShop
- {
- class Program
- {
- static void Main(string[] args)
- {
- var product = Console.ReadLine().ToString();
- var town = Console.ReadLine().ToString();
- var quantity = double.Parse(Console.ReadLine());
- if (town == "Sofia")
- {
- if (product == "coffee")
- {
- Console.WriteLine(quantity * 0.50);
- }
- if (product == "water")
- {
- Console.WriteLine(quantity * 0.8);
- }
- if (product == "beer")
- {
- Console.WriteLine(quantity * 1.2);
- }
- if (product == "sweets")
- {
- Console.WriteLine(quantity*1.45);
- }
- if (product == "peanuts")
- {
- Console.WriteLine(quantity*1.6);
- }
- }
- if (town == "Plovdiv")
- {
- if (product == "coffee")
- {
- Console.WriteLine(quantity * 0.4);
- }
- if (product == "water")
- {
- Console.WriteLine(quantity * 0.7);
- }
- if (product == "beer")
- {
- Console.WriteLine(quantity * 1.15);
- }
- if (product == "sweets")
- {
- Console.WriteLine(quantity * 1.3);
- }
- if (product == "peanuts")
- {
- Console.WriteLine(quantity * 1.5);
- }
- }
- if (town == "Varna")
- {
- if (product == "coffee")
- {
- Console.WriteLine(quantity * 0.45);
- }
- if (product == "water")
- {
- Console.WriteLine(quantity * 0.7);
- }
- if (product == "beer")
- {
- Console.WriteLine(quantity * 1.1);
- }
- if (product == "sweets")
- {
- Console.WriteLine(quantity * 1.35);
- }
- if (product == "peanuts")
- {
- Console.WriteLine(quantity * 1.55);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment