Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.33 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ExamplesC
  8. {
  9.     class Program
  10.     {
  11.         static bool exitgame = false;
  12.         static void Main(string[] args)
  13.         {
  14.             Console.WriteLine("Welcome stranger, would you like to visit my shop?");
  15.             while (!exitgame)
  16.             {
  17.                 string result = Console.ReadLine();
  18.                 if (result == "yes")
  19.                 {
  20.                     Console.WriteLine("Have a good look:");
  21.                     Console.WriteLine("1. Iron Sword");
  22.                     Console.WriteLine("2. Iron Axe");
  23.                     Console.WriteLine("3. Potions");
  24.                     Console.WriteLine("4. Holy Water");
  25.  
  26.                     exitgame = true;
  27.                 }
  28.                 else if (result == "no")
  29.                 {
  30.                     Console.WriteLine("fuk u lil shit, i sell gud stuff, you must die");
  31.                     Console.WriteLine("* Merchant stabs you");
  32.                     Console.WriteLine("* You died.");
  33.  
  34.                     exitgame = true;
  35.                 }
  36.                 else
  37.                 {
  38.                     Console.WriteLine("Invalid Command..");
  39.                 }
  40.             }
  41.             Console.ReadKey();
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement