QuizMaker
// ---TIPS BEFORE COPY PASTE---
//Press cntrl + A to copy everything
//Change visual_studio_program_1 at the very top if you are doing it in a diferent project name
//Contact me kgiotakos@gmail.com , discord: GostGK_YT#1554 or GostGK_YT#1111
//HERES THE CODE
using System;
using System.Threading;
namespace Visual_Studio_Program_1
{
class Program
{
static void Main(string[] args)
{
MakeAQuiz();
Console.ReadKey();
}
static void MakeAQuiz()
{
Console.Write("Please input your question: ");
string UserQuestionInput = Console.ReadLine();
Console.Write("Please input the first answer: ");
string UserAnswer1Input = Console.ReadLine();
Console.Write("Please input the second answer: ");
string UserAnswer2Input = Console.ReadLine();
Console.Write("Which of 1 and 2 is the correct answer?(Reply with a 1 or 2: ");
int UserCorrectAnswerInput = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Are you sure you want to continue?(you can't change settings after)(answer with Y/N) ");
string UserAreYouSureInput = Console.ReadLine();
if (UserAreYouSureInput == "Y")
{
Console.WriteLine("Please wait 5 seconds");
Wait1Second();
Console.WriteLine("Please wait 4 seconds");
Wait1Second();
Console.WriteLine("Please wait 3 seconds");
Wait1Second();
Console.WriteLine("Please wait 2 seconds");
Wait1Second();
Console.WriteLine("Please wait 1 seconds");
Wait1Second();
for (int i = 0; i <= 100000;)
{
i = i + 1;
Console.WriteLine("\n");
}
}
else if(UserAreYouSureInput == "N")
{
Console.WriteLine("Please restart the applicartion to change things. ");
}
else
{
Console.WriteLine("Please input a Y/N(uppercase).Restart the application to change things.");
}
static void Wait1Second()
{
for (int i = 0; i < 5; i++)
{
Thread.Sleep(200);
}
}
Console.WriteLine(UserQuestionInput + "," + UserAnswer1Input + " or " + UserAnswer2Input + "?");
Console.Write("Please reply with a 1 or 2: ");
int PlayerAnswer = Convert.ToInt32(Console.ReadLine());
if (PlayerAnswer == UserCorrectAnswerInput)
{
Console.WriteLine("Correct!Restart the application to replay!");
}
else if (PlayerAnswer != UserCorrectAnswerInput)
{
Console.WriteLine("Wrong!Restart the application to replay!");
}
else
{
Console.WriteLine("Please input 1 or 2.Not letters/sumbols/other numbers rather than 1 or 2.Restart the application to replay!");
}
}
}
}
Σχόλια
Δημοσίευση σχολίου