Advertisement
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;
- using System.Threading.Tasks;
- namespace GuessingGame
- {
- class Program
- {
- static void Main(string[] args)
- { //Intro
- Console.WriteLine("Hello! Welcome to the guessing game!");
- Console.WriteLine("Push any key to continue.");
- Console.ReadKey();
- Console.WriteLine("You will be asked a question and presented with three options.");
- Console.WriteLine("Type the correct one's letter and you get a point!");
- Console.WriteLine("Push any key to continue.");
- Console.ReadKey();
- //Question 1
- Console.WriteLine("Question 1:");
- Console.WriteLine("Who is the current president?");
- Console.WriteLine("A)Obama B)Jesus C)Ashton Kutcher");
- //Define Variables
- int points = 0;
- //Question 1 Code
- switch(Console.ReadKey())
- {
- case ConsoleKey.A:
- Console.WriteLine("Correct!");
- points++;
- Console.WriteLine("You have " + points + " point!");
- Console.ReadKey();
- break;
- default:
- Console.WriteLine("Incorrect. You disgrace.");
- Console.ReadKey();
- break;
- }
- Console.WriteLine("Question 2");
- Console.WriteLine("What is your favorite food?");
- Console.WriteLine("A)Pizza B)Curry C)Waffles");
- //Question 2 Code
- switch(Console.ReadKey())
- {
- case ConsoleKey.B:
- Console.WriteLine("Correct!");
- points++;
- Console.WriteLine("You have " + points + " points!");
- Console.ReadKey();
- break;
- default:
- Console.WriteLine("You serious? This should be easy.");
- Console.ReadKey();
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement