Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication50
- {
- class Program
- {
- static void Main(string[] args)
- {
- Queue<string> prizes = new Queue<string>();
- prizes.Enqueue("Trip to Summer Camp in Poland");
- prizes.Enqueue("Cuddly Bear");
- prizes.Enqueue("Random celebrity as a butler");
- prizes.Enqueue("All inclusive trip to shutdown disneyland UAE");
- prizes.Enqueue("£5000");
- foreach (string item in prizes)
- {
- Console.WriteLine(item);
- }
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("After 5 seconds press enter!");
- string ready = Console.ReadLine();
- Console.Clear();
- Console.WriteLine("What is the first prize?");
- string first = Console.ReadLine();
- if (prizes.Peek().Equals(first))
- {
- Console.WriteLine("Correct!!");
- prizes.Dequeue();
- }
- Console.WriteLine("What is the second prize?");
- string second = Console.ReadLine();
- if (prizes.Peek().Equals(second))
- {
- Console.WriteLine("Correct!!");
- prizes.Dequeue();
- }
- Console.WriteLine("What is the third prize?");
- string third = Console.ReadLine();
- if (prizes.Peek().Equals(third))
- {
- Console.WriteLine("Correct!!");
- prizes.Dequeue();
- }
- Console.WriteLine("What is the fourth prize?");
- string fourth = Console.ReadLine();
- if (prizes.Peek().Equals(fourth))
- {
- Console.WriteLine("Correct!!");
- prizes.Dequeue();
- }
- Console.WriteLine("What is the fifth prize?");
- string fifth = Console.ReadLine();
- if (prizes.Peek().Equals(fifth))
- {
- Console.WriteLine("Correct!!");
- prizes.Dequeue();
- }
- else
- {
- Console.WriteLine("Wrong! You lose!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement