// Cout is used to print to the standard output device which // is usually a terminal window. cout << "Hello world" << endl; // Technically endl is a strange beast, but it basically ends // up being like using a new-line character. cout << "Hello world\n"; // Using endl will send a new-line and it will force data to be // written to the device or file. Usually '\n' does the same // thing but not always. cout << "The sum is " << sum << endl; // Notice the space in the string before printing the variable // sum. It looks nicer to have a space before a number.