/*
   Print program to illustrate how cout stream works
   See Nyhoff P 80
*/

#include <iostream>           // Include cin / cout streams for input/output
using namespace std;          // Use this otherwise we need to write std::cout below.

int main()               
{                                      // First line of program
   cout << "Hello world";              // Print the string
   cout << "Again hello world";        // Print the string   
   cout << endl;                       // Print a line shift
   
   cout << "Number=" << 42 << endl;    // Print string, integer, string

   cout << "pi="                       // Source code formatting doesn't affect output
        << 3.14159
        << endl;                       // Print string, decimal, string

   cout << "2+2=" << 2+2 << endl;      // Make calculation in stream

   return 0;
}                                      // Last line of the program
