#includeusing namespace std; int main() { cout << "Hello, world!" << endl; return 0; }
#includeIn this example, variables of different types (int, double, char) are outputted to the console using the << operator and the endl manipulator. Each variable is automatically converted to a string before being outputted. The ostream library is included in the C++ Standard Library.using namespace std; int main() { int num = 42; double pi = 3.14159; char ch = 'A'; cout << num << endl; cout << pi << endl; cout << ch << endl; return 0; }