Hi I'm working on a program that compares the users response to an answer like a quiz. At first I wasn't sure how to do this using cin because the answer was two words. Someone helped me out and showed me the getline command. The only problem is if i enter the answers in all lowercase the user has too as well. Any suggestions.
Heres an example of my code
string answer26 = "sulfur trioxide";
string userresponse26;
cout << "\n26. SO3:\n\t";
getline(cin,userresponse26);
if (userresponse26 == answer26)
{
cout << "Correct" << endl;
score += 1;
}
else
{
cout << "Incorrect" << endl;
}