Your biggest problem will be deciding if what the user entered is correct or not.
For example, say you have the following question:
What date is Christmas day?
Your answer is stored as 25 December.
What if the user types
December 25,
December 25th or
25th of December?
All are correct, but as none are exactly the same as your specified answer it will be flagged as incorrect.
It might therefore be worth considering a multiple choice version where each question can be answered with a, b, c or d.
You will have to type a lot more answers in, but at least your program knows that there is only one correct answer and what it is.
One method of doing this would be to create an array like Questions$(1000,6) which allows for up to 1000 questions. The second array element (6) would be used for the following:
Questions$(1,0) - The question
Questions$(1,1) - Answer option 1
Questions$(1,2) - Answer option 2
Questions$(1,3) - Answer option 3
Questions$(1,4) - Answer option 4
Questions$(1,5) - The number of the correct answer (1 - 4)
Questions$(1,6) - Whether the question has been answered correctly or not
(All the data would be loaded in from an external file).
So your program would print Questions$(QNum,0) then print the four answer options Questions$(QNum,1), Questions$(QNum,2), Questions$(QNum,3) and Questions$(QNum,4).
Questions$(QNum,5) would be checked to see which one of the four options is the correct answer.
Questions$(QNum,6) would initially be left empty, but you would set that element of the array to "Y" to denote that the question has been answered correctly or "N" to say it was answered incorrectly.
When you randomly select a question, if Questions$(QNum,6) is empty or "N" then ask the question. If it's "Y" then don't ask the question.
This allows questions can be asked again and again until they are answered correctly then not asked again.
TDK_Man