In previous articles, we created functions, multi-dimensional character array to store questions, options, and answers. Up to this point, we have everything ready to finish gameplay.
Here we will use the following techniques:
Here we will use the following techniques:
- Create for loop to display question one by one
- Create another infinite loop inside for loop to check the answer given by the user. The loop breaks only if the user-provided an answer is within options (a, b, c and d) otherwise it will loop infinitely.
- Calculate the score for the correct answer provided.
- Use gotoxy to manage text indentation.