C++ Example - Output Newline
Use C++ for output, and line-break multiple output contents, using \n or endl:
Example - \n Newline
#include <iostream>
using namespace std;
int main() {
cout << "Example \n";
cout << "Google \n";
cout << "Taobao";
return 0;
}
Example - endl Newline
#include <iostream>
using namespace std;
int main() {
cout << "Example" << endl;
cout << "Google" << endl;
cout << "Taobao";
return 0;
}
The output of the above program execution is:
Example Google Taobaoother extensions