SHARE
TWEET

Untitled

Sim0o0na Jun 15th, 2017 180 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace NeighborhoodMagazin
  8. {
  9.     class NeighborhoodMagazin
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var product = Console.ReadLine().ToLower();
  14.             var town = Console.ReadLine().ToLower();
  15.             var quantity = double.Parse(Console.ReadLine());
  16.                 if (town == "sofia")
  17.             {
  18.                 if (product == "coffe")
  19.                     Console.WriteLine(0.50 * quantity);
  20.                 else if (product == "water")
  21.                     Console.WriteLine(0.80 * quantity);
  22.                 else if (product == "beer")  
  23.                     Console.WriteLine(1.20 * quantity);
  24.                 else if (product == "sweets")
  25.                     Console.WriteLine(1.45 * quantity);
  26.                 else if (product == "peanuts")
  27.                     Console.WriteLine(1.60 * quantity);
  28.             }
  29.             else if (town == "provdiv")
  30.             {
  31.                 if (product == "coffe")
  32.                     Console.WriteLine(0.40 * quantity);
  33.                 else if (product == "water")
  34.                     Console.WriteLine(0.70 * quantity);
  35.                 else if (product == "beer")
  36.                     Console.WriteLine(1.30 * quantity);
  37.                 else if (product == "sweets")
  38.                     Console.WriteLine(1.15 * quantity);
  39.                 else if (product == "peanuts")
  40.                     Console.WriteLine(1.50 * quantity);
  41.             }
  42.             else if (town == "varna")
  43.             {
  44.                 if (product == "coffe")
  45.                     Console.WriteLine(0.45 * quantity);
  46.                 else if (product == "water")
  47.                     Console.WriteLine(0.70 * quantity);
  48.                 else if (product == "beer")
  49.                     Console.WriteLine(1.10 * quantity);
  50.                 else if (product == "sweets")
  51.                     Console.WriteLine(1.35 * quantity);
  52.                 else if (product == "peanuts")
  53.                     Console.WriteLine(1.55 * quantity);
  54.             }
  55.              else
  56.             {
  57.                 Console.WriteLine("Not anvalid");
  58.             }
  59.         }
  60.     }
  61. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top