Guest User

Untitled

a guest
Jun 25th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Console.WriteLine("Would you prefer what is behind door number 1, 2 or 3?");
  13.             string userValue = Console.ReadLine();
  14.             if (userValue == "1")
  15.             {
  16.                 Console.WriteLine("Congratulations, you won a new car!");
  17.                 Console.ReadLine();
  18.             }
  19.             else if (userValue == "2")
  20.             {
  21.                 Console.WriteLine("Not bad! You won £100!");
  22.                 Console.ReadLine();
  23.             }
  24.             else if (userValue == "3")
  25.             {
  26.                 Console.WriteLine("Unlucky, you only won £5.");
  27.                 Console.ReadLine();
  28.             }
  29.             else
  30.             {
  31.                 Console.WriteLine("Sorry, we didn't understand your command, therefore you lose.");
  32.                 Console.ReadLine();
  33.             }
  34.         }
  35.     }
  36. }
Add Comment
Please, Sign In to add comment