How do I make the output spaced in the console in this code?
cout<<"Here's my information: "" My name is " <<MyName<< "I'm "<<MyAge<< "and I live in "<<MyCity<<endl; |
In the output it's doing this "My name is JoeI'm 30I live in Boston"
______________________________________
(previous topic below)
Hi, I am new to programming.
I have 2 questions.
1. How do I simply make the console have a space between the questions and answers?
2. How do I make the program ignore anything that is not an acceptable answer.
Example: How old are you?
"I'm 500,250 years old." (unless they are a resurrected dinosaur)
or What is your name?
"I am #2"
/////
In my program you can see I simply want to restate their name. So if they were to say
"I am Joe" The only way to restate only the name I suppose would create a filter list of sorts to ignore statements like "My name is ()", "I am()" , "they call me ()"
output : [IMG]
http://i1357.photobucket.com/albums/q743/Simon_Crawford/howtoforumpost_zpsd6ef3f7c.jpg[/IMG]
code: [IMG]
http://i1357.photobucket.com/albums/q743/Simon_Crawford/programminghelp00000001_zpsa16ef595.jpg[/IMG]