
-----------------------------------
downisleft
Mon Mar 09, 2009 6:01 pm

Reading a question and the correct answer from a data file
-----------------------------------
So... a little suck. my problem being i don't understand how to get both a answer and a question from a single .txt file. 
The problem is :
Create a history drill program that:

1. Reads a history question and the correct answer from a data file;
2. Presents the question to the user;
3. Uses a subroutine to get the user's answer to the question; 
4. Checks the user's answer against the correct answer and provides feedback;
5. Keeps track of the number of correct and incorrect answers;
6. Repeats steps 1 through 5 several times;
7. At the end of the quiz, informs the user of the number of correct and incorrect answers 

And my txt file looks like this

[code]
--> Questions  Answers 