0
What to do to print only one line?
<<"C++ is bad "; <<"C++ is good"; I want only "C++ is good" in output
6 ответов
+ 1
Comment out the above line
//cout<<"c++ is bad";
cout<<"c++ is good";
Or
/*cout<<"c++ is bad";*/
cout<<"c++ is good";
..And if you are asking about how to next statement in new line then you can use endl,
cout<<"c++ is bad"<<endl;
cout<<"c++ is good"<<endl;
+ 2
Your question is not clear what do you mean by print one line.
+ 1
Delete the line that prints out C++ is bad, or comment it out.
+ 1
if there is no need of first statement then why u want to print it just make it comment . If u dont want to do comment then youn write both statement in if else condition or use switch case if your condition will be true then first statement will execute otherwise second one.
+ 1
Or you can do like this
#include <iostream>
using namespace std;
int main() {
cout<<11+"C++ is bad ""C++ is good";
return 0;
}
0
#include <iostream>
int main() {
std.count << "Only one line";
return 0;
}