Advertisement
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 magazinche
- {
- class Program
- {
- static void Main(string[] args)
- {
- var product = Console.ReadLine();
- var city = Console.ReadLine();
- var quanty = Double.Parse(Console.ReadLine());
- if (city == "Sofia")
- {
- if (product == "coffee") { Console.WriteLine(quanty * 0.5); }
- else if (product == "water") { Console.WriteLine(quanty * 0.8); }
- else if (product == "beer") { Console.WriteLine(quanty * 1.2); }
- else if (product == "sweets") { Console.WriteLine(quanty * 1.45); }
- else if (product == "peanuts") {Console.WriteLine(quanty* 1.6);}
- }
- if (city == "Plovdiv")
- {
- if (product == "coffee") {Console.WriteLine(quanty * 0.4);}
- else if (product == "water") {Console.WriteLine(quanty * 0.7);}
- else if (product == "beer") {Console.WriteLine(quanty * 1.15);}
- else if (product == "sweets") {Console.WriteLine(quanty * 1.30);}
- else if (product == "peanuts") {Console.WriteLine(quanty * 1.50);}
- }
- if (city == "Varna")
- {
- if (product == "coffee") { Console.WriteLine(quanty * 0.45); }
- else if (product == "water") { Console.WriteLine(quanty * 0.7); }
- else if (product == "beer") { Console.WriteLine(quanty * 1.10); }
- else if (product == "sweets") { Console.WriteLine(quanty * 1.35); }
- else if (product == "peanuts") { Console.WriteLine(quanty * 1.55); }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement