Addition Quiz Game
Learn about generating random numbers and using them to create an interesting interactive quiz game.
We'll cover the following...
Problem
Write a program that prompts 10 single-digit addition questions for the user to answer, provides feedback based on user’s response, and prints out the user's score.
1 + 1 = (enter 2) Correct.2 + 7 = (enter 8) Wrong!...6 + 3 =Your score: 8/10
Demo of addition quiz game
Purpose
Use
rand()
to generate a random number ...