/******************************* IF.CPP ***************************************
* Example showing for-loop and if-statements                       1998-10-01 *
*                                                                   Agner Fog *
*                                                                             *
* Note that the code is indented for every '{' and outdented for every '}'.   *
* This makes it easy to see where each curly bracket begins and ends.         *
* It is important to follow this style, otherwise your code will be very      *
* difficult to read - even for yourself!                                      *
*                                                                             *
******************************************************************************/

#include <iostream.h>
#include <conio.h>

void main()
{
   int data;
   clrscr(); // clear screen

   for(data = 0;  data < 10;  data = data + 1)
   {
      if (data == 0)
      {
	     cout << "\nData is zero";
      }

      if (data < 5)
      {
	     cout << "\nData is " << data << ", which is small";
      }
      else
      {
	     cout << "\nData is " << data << ", which is big";
      }
   }  // end of for loop

   cout << "\n\nPress any key to continue";
   getch();  // wait for key pressure
}

