I've only been experimenting with programming for about 3 days, so please be kind. I am just playing around trying to make a program to learn stuff, but this doesn't do what I want it to. Can someone point me in the right direction, of what I am doing wrong?
I basically want the user to input the correct answer before moving on.
Sorry if this seems stupid.
// My first attempt at a program
cout<<"Here is my first program. Answers are one word, and lowercase.\n Enjoy!",endl;
cout<<"What has a bed, but doesn't sleep?\n A mouth, but doesn't talk? \n", endl;
cout<<"and a head, but doesn't think?\n", endl;
cout<< "Answer: ";
if (ans1 != " river ")
cout<<"\nPlease Try Again\n", endl;
while (ans1 != " river ") ;
cout<<"I can only do my job when my head is struck,\n","What am I?\n", endl;
cout<<"Answer: " ;
if (ans2 != "match")
cout<<"Please Try Again\n", endl; }
while(!(ans2 == "match"));
cout<<"Thank you for playing!", endl;