G2A Many GEOs
SHARE
TWEET

Untitled

a guest Mar 28th, 2020 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Lockle_Shop
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string product = Console.ReadLine().ToLower();
  10.             string town = Console.ReadLine().ToLower();
  11.             double quantity = double.Parse(Console.ReadLine());
  12.  
  13.             if (town == "sofia")
  14.             {
  15.                 if (product == "coffee") Console.WriteLine(quantity * 0.50);
  16.                 else if (product == "water") Console.WriteLine(quantity * 0.80);
  17.                 else if (product == "beer") Console.WriteLine($"{ quantity * 1.20:F2}");
  18.                 else if (product == "sweets") Console.WriteLine(quantity * 1.45);
  19.                 else if (product == "peanuts") Console.WriteLine(quantity * 1.60);
  20.                 else Console.WriteLine("Invalid product");
  21.             }
  22.             if (town == "plovdiv")
  23.  
  24.             {
  25.                 if (product == "coffee") Console.WriteLine(quantity * 0.40);
  26.                 else if (product == "water") Console.WriteLine($"{quantity * 0.70:F2}");
  27.                 else if (product == "beer") Console.WriteLine(quantity * 1.15);
  28.                 else if (product == "sweets") Console.WriteLine(quantity * 1.30);
  29.                 else if (product == "peanuts") Console.WriteLine(quantity * 1.50);
  30.                 else Console.WriteLine("Invalid product");
  31.             }
  32.  
  33.             if (town == "varna")
  34.             {
  35.                 if (product == "coffee") Console.WriteLine(quantity * 0.45);
  36.                 else if (product == "water") Console.WriteLine(quantity * 0.70);
  37.                 else if (product == "beer") Console.WriteLine(quantity * 1.10);
  38.                 else if (product == "sweets") Console.WriteLine(quantity * 1.35);
  39.                 else if (product == "peanuts") Console.WriteLine(quantity * 1.55);
  40.                 else Console.WriteLine("Invalid product");
  41.             }
  42.            
  43.          
  44.  
  45.         }
  46.     }
  47. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
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