Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Would you prefer what is behind door number 1, 2 or 3?");
- string userValue = Console.ReadLine();
- if (userValue == "1")
- {
- Console.WriteLine("Congratulations, you won a new car!");
- Console.ReadLine();
- }
- else if (userValue == "2")
- {
- Console.WriteLine("Not bad! You won £100!");
- Console.ReadLine();
- }
- else if (userValue == "3")
- {
- Console.WriteLine("Unlucky, you only won £5.");
- Console.ReadLine();
- }
- else
- {
- Console.WriteLine("Sorry, we didn't understand your command, therefore you lose.");
- Console.ReadLine();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment