From e279d4092ac6e9c2b0e2c67dc1a6485955194d7a Mon Sep 17 00:00:00 2001 From: fdlt3885 Date: Fri, 3 Feb 2023 17:37:37 +0000 Subject: [PATCH] Refactoring: edited text and changed prizes. --- src/main/quizproject.c | 87 +++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 30 deletions(-) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 7932fde..5a74f7a 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -1255,11 +1255,11 @@ void B_userinfo(void){ char info[100] = {0}; printf("How old are you?\n"); scanf("%s", info); - printf("\t\t Nice!!!\n\n"); + printf("\t\t You are old enough!!!\n\n"); } void B_displayGameInstructions() { - printf("To start this game, here are the instructions:\n\n # Read each question carefully and select the best answer from the choices provided.\n # You will receive points for each correct answer, and the game will keep track of your progress.\n # At the end of the game, you will be shown your final score and will have the option to play again.\n # Have fun and good luck!\n\n\n"); + printf("To start this game, here are the instructions:\n\n # Read each question carefully and select the best answer from the choices provided.\n # You will receive points and prizes for each correct answer, and the game will keep track of your progress.\n # At the end of the game, you will be shown your final score and will have the option to play again.\n # Have fun and good luck!\n\n\n"); } int B_testround(void) { @@ -1300,7 +1300,7 @@ int B_round1(void) { int score = 0; char answer[20]; - printf("Round 1\n\n"); + printf("Round 1 - Math\n\n"); printf("Question 1: What is the value of x in the equation 2x + 1 = 7?\n\n"); printf("Hint: Subtract 1 from both sides and then divide both sides by 2.\n\n"); printf("Options: 6, 1, 3, 4\n\n"); @@ -1308,7 +1308,7 @@ int B_round1(void) { scanf("%s", answer); if (strcmp(answer, "3") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a diamond.\n\n"); int i, j, k; for (i = 0; i < 5; i++) { @@ -1346,7 +1346,7 @@ int B_round1(void) { scanf("%s", answer); if (strcmp(answer, "2") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a triangle.\n\n"); int i, j; for (i = 0; i < 5; i++) { for (j = 0; j <= i; j++) { @@ -1373,7 +1373,7 @@ int B_round2(void) { scanf("%s", answer); if (strcmp(answer, "False") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a star.\n\n"); int i, j, k; for (i = -4; i <= 4; i++) { for (j = 4; j >= abs(i); j--) { @@ -1400,7 +1400,7 @@ int B_round2(void) { scanf("%s", answer); if (strcmp(answer, "True") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a Sword.\n\n"); printf(" /\\\n"); printf(" / \\\n"); printf(" / \\\n"); @@ -1430,7 +1430,7 @@ int B_round3(void) { scanf("%s", answer); if (strcmp(answer, "8") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a triangle.\n\n"); int i, j; for (i = 0; i < 5; i++) { for (j = 0; j <= i; j++) { @@ -1450,7 +1450,7 @@ int B_round3(void) { scanf("%s", answer); if (strcmp(answer, "206") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a cat.\n\n"); printf(" /\\_/\\\n( o.o )\n > ^ < \n"); score++; } else { @@ -1470,7 +1470,7 @@ int B_round4(void) { scanf("%s", answer); if (strcmp(answer, "Paris") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a Cow.\n\n"); printf(" \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n"); score++; @@ -1485,7 +1485,7 @@ int B_round4(void) { scanf("%s", answer); if (strcmp(answer, "a") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a stick man.\n\n"); printf(" o\n \\|/\n / \\\n"); score++; } else { @@ -1505,7 +1505,7 @@ int B_round5(void) { scanf("%s", answer); if (strcmp(answer, "c") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a diamond.\n\n"); printf(" /\\\n ( )\n ( )\n ( )\n \\/\n"); score++; } else { @@ -1519,7 +1519,7 @@ int B_round5(void) { scanf("%s", answer); if (strcmp(answer, "a") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a sitting stick man.\n\n"); printf(" (o)\n /( )\\\n( )( )\n"); score++; } else { @@ -1540,7 +1540,7 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "c") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a turtle shell.\n\n"); printf(" ___\n // \\\\\n(( ))\n \\ //\n ----\n"); score++; } else { @@ -1554,7 +1554,7 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "a") == 0) { - printf("Correct!\n\n"); + printf("Correct! you won a dog.\n\n"); printf(" /\\_/\\\n( o.o )\n > ^ < \n"); score++; } else { @@ -1575,8 +1575,12 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "d") == 0) { - printf("Correct!\n\n"); - printf(" _______\n / \\\n| Car |\n \\_______/\n"); + printf("Correct! You won a house.\n\n"); + printf(" _____\n"); + printf(" / \\\n"); + printf(" /_______\\\n"); + printf(" |[ ] [ ]|\n"); + printf(" | = |\n"); score++; } else { printf("Incorrect. The answer is d.\n\n"); @@ -1589,9 +1593,16 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "a") == 0) { - printf("Correct!\n\n"); - printf(" \\ / \\ \n \\ / \\ \n \\/_____\\ \n // \\ \n // \\ \n//__________\\\n"); - + printf("Correct! You won a tree.\n\n"); + printf(" *\n"); + printf(" ***\n"); + printf(" *****\n"); + printf(" *******\n"); + printf(" *********\n"); + printf(" ***********\n"); + printf(" *****\n"); + printf(" *****\n"); + printf(" *****\n"); score++; } else { printf("Incorrect. The answer is a.\n\n"); @@ -1611,7 +1622,7 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "a") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won an Emerald.\n\n"); printf(" /\\\n / \\ /\\\n / \\ / \\ \n/ \\ \\ \n\\ / / \n \\ / \\ / \n \\ /\\\n \\/\n"); score++; @@ -1626,7 +1637,7 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "a") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a bird.\n\n"); printf(" /\\_/\\\n( o.o )\n > ^ < \n"); score++; } else { @@ -1647,8 +1658,18 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "True") == 0) { - printf("Correct!\n\n"); - printf("_________\n| |\n| PC |\n|_________|\n"); + printf("Correct! You won a computer.\n\n"); + printf(" ________________\n"); + printf("| |\n"); + printf("| |\n"); + printf("| |\n"); + printf("| |\n"); + printf("|________________|\n"); + printf(" __________\n"); + printf(" | ________ |\n"); + printf(" | | | |\n"); + printf(" | |______| |\n"); + printf(" |__________|\n"); score++; } else { printf("Incorrect. The answer is True.\n\n"); @@ -1661,8 +1682,14 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "True") == 0) { - printf("Correct!\n\n"); - printf(" _________\n| |\n| Calculator |\n|_________|\n"); + printf("Correct! You won a tooth.\n\n"); + printf(" ____________\n"); + printf(" / \\\n"); + printf(" / \\\n"); + printf("(______________()\n"); + printf(" \\ ___ /\n"); + printf(" \\ / \\ /\n"); + printf(" \\/ \\/\n"); score++; } else { printf("Incorrect. The answer is True.\n\n"); @@ -1682,7 +1709,7 @@ printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "H2O") == 0) { - printf("Correct!\n"); + printf("Correct! You won a cool shape.\n"); printf(" ____\n / \\\n/________\\\n\\________/\n \\____/\n"); score++; } else { @@ -1690,13 +1717,13 @@ if (strcmp(answer, "H2O") == 0) { } printf("Question 2: Who developed the theory of relativity?\n\n"); -printf("Hint: A German-born physicist."); +printf("Hint: A German-born physicist.\n\n"); printf("Options: a.)Isaac Newton b.)Albert Einstein c.)Stephen Hawking d.)Neil deGrasse Tyson\n\n"); printf("Answer: "); scanf("%s", answer); if (strcmp(answer, "b") == 0) { - printf("Correct!\n\n"); + printf("Correct! You won a rocket.\n\n"); printf(" /\\\n//\\\\\nV V\n"); score++; } else { @@ -1724,7 +1751,7 @@ void B_write_review(void) { scanf(" %c", &response); if (response == 'y') { - printf("Please write your review:\n\n"); + printf("Please write a one word review: (eg. amazing, cool, etc.)\n\n"); scanf("%s", review); printf("Thank you for your review\n\n"); } else if (response == 'n') {