I have this code
and when the last cout is executed there are no spaces between the "hello" and "yourName" and the other one too...help?
| Code: |
|
#include <iostream> #include <conio.h> using namespace std; int main(void){ int age; char yourName[10]; cout <<"Please enter your age: " <<endl; cin >> age; cout <<"Please enter your name with no spaces: " <<endl; cin >> yourName; cout <<"Hello" << yourName << "! You're" <<age << " years old!" <<endl; cin.get(); getch(); } |
and when the last cout is executed there are no spaces between the "hello" and "yourName" and the other one too...help?
