+ 2
Printing three different line statements
i have int main() { prints<<"text"<<endl; ?????<<"text"<<endl; ?????<<"text"<<endl; ?????<<"text"<<endl; ?????<<"text"<<endl; then is it return 0; } im confused what to put in place of ???? and how to make sure it prints each text sentence and are they considered var const or my class, im just alittle confused qhen you put the codes into a page how you tell the diff. i hope that made since can someone just simplify it for me. thanks
13 Respuestas
+ 6
???? = cout
+ 4
cout<<"hai\nhai\nhai";
+ 2
You don't have to do it on each line, but you can, what you can also do is:
cout << "text" << endl << "text" << endl << "text" << endl << "text" << endl << "text" << endl << "text" << endl;
But it can get a little messy.
+ 2
I think the best is, this..
cout<<"text \n text \n text \n";
+ 1
have to type it sep. on each line?
+ 1
do you have to put a return 0 befor the} at the end, it waa causing error saying return wasnt declared
+ 1
thank you for your imput helps alot
+ 1
u cn also try this {
cout<<"text \n text \n text \n";
+ 1
if you are using code blocks than,it is not necessary to write return.....compiler automatically insert return 0
0
ничего не понял
0
cout
0
cout is fell in place of ?????
0
\n is an better alternative for endl