+ 1

Why does it look like a paragraph of one big word...why is there no spaces...what am I doing wrong...code in comments

29th Jan 2017, 4:16 PM
Jacqueline Mcdonald
Jacqueline Mcdonald - avatar
5 odpowiedzi
+ 12
You didn't provide us with any code! That's what you're doing wrong!…… ~_~
29th Jan 2017, 4:37 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 7
xD
29th Jan 2017, 4:40 PM
Kawaii
Kawaii - avatar
+ 6
cout << "There once was person named"; Put a space after name just before the " like this: cout << "There once was person named "; Do that for every cout << "(words) ";
29th Jan 2017, 5:25 PM
Jafca
Jafca - avatar
+ 2
string profession; string animal; string petname; cout << "Please enter name: " <<endl; cin >> name; cout << "Please enter age: "<< endl; cin >> age; cout << "Please enter city: " <<endl; cin >> city; cout << "Please enter college: " <<endl; cin >> college; cout << "Please enter profession: "<<endl; cin >> profession; cout << "Please enter animal: "<<endl; cin >> animal; cout << "Please enter petname: "<<endl; cin >> petname; cout << "There once was person named"; cout << name << setw(2)<<"who lived in"; cout << city<<"."<<setw(2)<<"At the age of"; cout << age <<","<<setw(2)<< name<<"went to,"; cout << college<<"." <<setw(2)<< name; cout << "graduated and went to work as a"; cout << profession <<"." << setw(2) <<"Then"; cout << name <<setw(2)<<"adopted a"<<setw(2); cout << animal <<"," << "named" <<setw(2); cout << petname <<"." <<setw(2)<<"They lived"; cout << "happily ever after."; }
29th Jan 2017, 4:52 PM
Jacqueline Mcdonald
Jacqueline Mcdonald - avatar
+ 2
Thanks Jafca
29th Jan 2017, 5:36 PM
Jacqueline Mcdonald
Jacqueline Mcdonald - avatar