diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 34fd95f..f2bbcfa 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -883,11 +883,25 @@ int B_testround(void) { printf("Answer: "); scanf("%s", answer); + if (strcmp(answer, "a") == 0) { + printf("Correct!\n"); + score++; + } else { + printf("Incorrect. The answer is a.\n"); + } + printf("Question 2: What is the smallest planet in our solar system?\n"); printf("Options: a.)Earth b.)Mars c.)Mercury d.)Sun "); printf("Answer: "); scanf("%s", answer); + if (strcmp(answer, "c") == 0) { + printf("Correct!\n"); + score++; + } else { + printf("Incorrect. The answer is c.\n"); + } + return score; }