/******************************* SQUARE.CPP ***********************************
* Example showing a function                                       1998-10-01 *
*                                                                   Agner Fog *
*                                                                             *
*                                                                             *
******************************************************************************/
#include <iostream.h>
#include <conio.h>

// function square computes the square of x
int square (int x)
{
   return x * x;
}


// main is where program execution begins
void main ()
{
   int i;
   for (i = 0;  i <= 20;  i = i + 1)
   {
      cout << "\nvalue = " << i << " square = " << square(i);
   }
   // wait for key pressure
   getch();
}

