Hi all. I'm a novice with C++ and I'd like to make a program that will present the user with a series of exam questions, most of which are numbers but some of which are descriptions. I want each question to repeat until the user enters the correct response (but I also want to give them the option of quiting the program so it is not an endless loop). After the user enters the correct response the next question appears. And so on. At the end of the questions, I want a summary of the questions and answers to appear.
Most of the questions will be letter symbols like variables which correspond to a numerical answer, or shore verbal questions. For example: many questions will simply be... "Lm=", "Lrr=", where "Lm" refers to, say, maximum length, etc. Lm, Lrr, and the other variables will have a constant number, e.g. 15'3 3/4", to check the users answer against. Some variables will have answers like "frame 1 to frame 5", etc. so they should be char or strings.
I was thinking of declaring one answer variable for the user for every question within a large nested conditionals, but I don't quite know how to go about it.
I was thinking something along the lines of...
if(usersAnswer=Lm), then ask the next question (which is "Lrr="); else ask Lm again and again until they get the correct answer.
if(usersAnswer=Lrr), then ask the next question (which is ...); else ask Lrr again and again until they get the correct answer.
...And so on...
Also, I would like to user to be able to enter answers like: 5'3 3/4" , which reads 5 feet and 3 and 3-quarter inches. How can you include spaces as well as single and double quotations as part of the variable and input by the user?
Can someone please help me with this? I don't know how the conditionals are supposed to look to get this done. If there is a more efficient way not involving conditionals, please let me know.