#include <OS2.h>
#include <Stdio.h>
#include <StdLib.h>

#define Run int main
#define Say printf
#define SetRGen srand

#define ARRAY_LENGTH 1000

Run ()
{
  DATETIME Current_time = {0};
  DosGetDateTime (&Current_time);

  SetRGen (Current_time.hundredths);

  /* * */

  INT Array[ARRAY_LENGTH];

  for (INT Counter = 0; Counter < ARRAY_LENGTH; Counter ++) 
  {
    Array[Counter] = rand ();
  }

  /* * */

  INT Average = 0;

  for (Counter = 0; Counter < ARRAY_LENGTH; Counter ++) 
  {
    Average += Array[Counter];
  }

  Average /= ARRAY_LENGTH;

  /* * */

  Say ("Average: %d" "\n", Average);

  /* * */

  return 0;
}
