Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Small_Shop
- {
- class Program
- {
- static void Main(string[] args)
- {
- string Product = Console.ReadLine();
- string Grad = Console.ReadLine();
- double Kolichestvo = double.Parse(Console.ReadLine());
- double price = 0;
- if (Grad=="Sofia")
- {
- if(Product=="coffee")
- {
- price = Kolichestvo * 0.50;
- }
- else if (Product == "water")
- {
- price = Kolichestvo * 0.80;
- }
- else if (Product == "beer")
- {
- price = Kolichestvo * 1.20;
- }
- else if (Product == "sweets")
- {
- price = Kolichestvo * 1.45;
- }
- else if (Product == "peanuts")
- {
- price = Kolichestvo * 1.60;
- }
- }
- else if (Grad == "Plovdiv")
- {
- if (Product == "coffee")
- {
- price = Kolichestvo * 0.40;
- }
- else if (Product == "water")
- {
- price = Kolichestvo * 0.70;
- }
- else if (Product == "beer")
- {
- price = Kolichestvo * 1.15;
- }
- else if (Product == "sweets")
- {
- price = Kolichestvo * 1.30;
- }
- else if (Product == "peanuts")
- {
- price = Kolichestvo * 1.50;
- }
- }
- else if (Grad == "Varna")
- {
- if (Product == "coffee")
- {
- price = Kolichestvo * 0.45;
- }
- else if (Product == "water")
- {
- price = Kolichestvo * 0.70;
- }
- else if (Product == "beer")
- {
- price = Kolichestvo * 1.10;
- }
- else if (Product == "sweets")
- {
- price = Kolichestvo * 1.35;
- }
- else if (Product == "peanuts")
- {
- price = Kolichestvo * 1.55;
- }
- }
- Console.WriteLine(price);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment