static int correctAnswers = 0, incorrectAnswers = 0;
public static void Main()
int choice = 0, amountOfQuestions = 0;
string[] questions = {"What is the world’s longest river called?\n[1]Canada\t[2]Nile\n[3]File\t [4]Amazon", "How many bones are there in the human body?\n[1]196\t[2]999\n[3]250\t[4]206", "Which planet is closest to Earth?\n[1]Mars\t [2]Mercury\n[3]Venus\t[4]Moon", "Fe is the chemical symbol for which element?\n[1]Gold\t\t[2]Silver\n[3]Ferrous\t [4]Iron", "What has a gravitational pull so strong that light cannot even escape it?\n[1]Dark Matter\t[2]Black Hole\n[3]Brown Dwarf\t[4]Exoplanet", "Where is the world’s largest active volcano located?\n[1]Antarctica\t[2]Brazil\n[3]California\t[4]Hawaii", "How many hearts does an octopus have?\n[1]03\t[2]01\n[3]18\t[4]5", "What is the rarest blood type? \n[1]O\t[2]A\n[3]B\t[4]AB Negative", "What language is the most spoken worldwide?\n[1]Chinese\t[2]Spanish\n[3]Arabic\t [4]English", "An organic compound is considered an alcohol if it has what functional group?\n[1]Hydroxyl\t [2]Carbonyl\n[3]Alkyl\t\t[4]Aldehyde", "The idea of Socialism was articulated and advanced by whom?\n[1]Karl Marx\t\t[2]Vladimir Lenin\n[3]Joseph Stalin\t[4]John Smith", "What is the fastest animal? \n[1]Cheetah\t\t [2]HorseFly\n[3]Golden Eagle\t[4]Peregrine Falcon", "How many objects are equivalent to one mole?\n[1]6.002 X 10^23\t\t[2]6.02 X 10^22\n[3]6.02 X 10^23\t\t [4]6.002 X 10^22", "How many legs is it biologically impossible for a centipede to have?\n[1]100\t[2]26\n[3]50\t [4]74", "Which of these fruits is NOT a berry?\n[1]Strawberry\t[2]Blueberry\n[3]Banana\t\t[4]Grape" };
string[] hints = {"Rhymes with Pile", "Around 200", "It is also the hottest", "Forms rust when oxidized", "Formed after a supernova", "It is in America", "More than 1", "Has A in it", "Not what you would think", "Ends in -yl", "His name is a homophone of another name", "This animal can fly", "Should've done your Chemistry homework", "Ironic", "Ironic (name is misleading)"};
int[] answers = {2, 4, 3, 4, 2, 4, 1, 4, 1, 1, 1, 4, 3, 1, 1};
int[] userAnswers = new int[15];
Console.WriteLine("----------------------------------RANDOM TRIVIA QUIZ------------------------------");
Console.WriteLine("Welcome to the Random Trivia Quiz!\nSome important things before you start: \n1. You enter the amount of questions you would like (5 - Easy 10 - Medium 15 - Hard or any amount up to 15)\n2. To choose an answer, you pick one of 4 choices\n3. Enjoy!");
Console.WriteLine("Enter amount of questions (up to 15): ");
amountOfQuestions = int.Parse(Console.ReadLine());
for (int i = 0; i < amountOfQuestions; i++)
Console.WriteLine(questions[i]);
Console.WriteLine("Answer: ");
Console.WriteLine("Stuck? Get a hint by pressing 0.");
userAnswers[i] = int.Parse(Console.ReadLine());
Console.WriteLine("Hint: " + hints[i]);
Console.WriteLine("Answer: ");
userAnswers[i] = int.Parse(Console.ReadLine());
Console.WriteLine(DetermineOutcome(userAnswers, answers, i));
percentage = Math.Round(((double)correctAnswers / (correctAnswers + incorrectAnswers) * 100), 2);
Console.WriteLine("Score: {0} / {1} \nPercentage: {2}%", correctAnswers, (correctAnswers + incorrectAnswers), percentage);
Console.WriteLine(EndMessage(percentage));
Console.WriteLine("Retake Quiz? \n [1] Yes \t [2] No");
choice = int.Parse(Console.ReadLine());
static string EndMessage (double percentage){
message = "WOW! You are good!";
else if (percentage < 90 && percentage >= 75){
else if (percentage < 75 && percentage >= 55){
message = "Not too shabby";
else if (percentage < 55 && percentage >= 35){
message = "Better Luck Next Time!";
message = "Yikes! I KNOW you can do better";
static string DetermineOutcome(int [] userAnswers, int [] answers, int i){
if (userAnswers[i] == answers[i])