A simple C++ program which prints "Hello World!" on the screen

// Needs this header file to support the C++ I/O system
#include <iostream.h>
#include <conio.h>

void main()
{

// "<<" is insertion operator
// which causes the expression on its right to
// be printed on the screen.
// "cout" is the standard output function.

  cout << "Hello World!" << endl;  // endl = \n.
  getch();
}


OUTPUT:

No comments:

Post a Comment