#include "scltypes.h"
#include "sclfuncs.h"

int main(int argc, char *argp[], char *envp[])
{

  INT_32BIT seed = 740726;

  INTEGER iu;

  INTEGER sum26 = 0;
  INTEGER sum25 = 0;
  INTEGER sum24 = 0;

  INTEGER sum01 = 0;
  INTEGER sum00 = 0;
  INTEGER sum99 = 0;

  for (INTEGER i=1; i<=2500000; i++) {
    iu = scl::iran(&seed, 25);
    if (iu >= 26) sum26++; 
    if (iu == 25) sum25++; 
    if (iu == 24) sum24++; 
    if (iu == 1) sum01++; 
    if (iu == 0) sum00++; 
    if (iu <= -1) sum99++; 
  }

  std::cout << sum26 << std::endl;
  std::cout << sum25 << std::endl;
  std::cout << sum24 << std::endl;
  std::cout << sum01 << std::endl;
  std::cout << sum00 << std::endl;
  std::cout << sum99 << std::endl;
  
  std::cout << std::endl;

  seed = 740726;

  sum26 = 0;
  sum25 = 0;
  sum24 = 0;

  sum01 = 0;
  sum00 = 0;
  sum99 = 0;

  for (INTEGER i=1; i<=2500000; i++) {
    iu = scl::iran(seed, 25);
    if (iu >= 26) sum26++; 
    if (iu == 25) sum25++; 
    if (iu == 24) sum24++; 
    if (iu == 1) sum01++; 
    if (iu == 0) sum00++; 
    if (iu <= -1) sum99++; 
  }

  std::cout << sum26 << std::endl;
  std::cout << sum25 << std::endl;
  std::cout << sum24 << std::endl;
  std::cout << sum01 << std::endl;
  std::cout << sum00 << std::endl;
  std::cout << sum99 << std::endl;
  
  std::cout << std::endl;

  seed = 947563829;

  INTEGER sum1001 = 0;
  INTEGER sum1000 = 0;
  INTEGER sum0999 = 0;

  sum01 = 0;
  sum00 = 0;
  sum99 = 0;

  for (INTEGER i=1; i<=2500000; i++) {
    iu = scl::iran(seed, 1000);
    if (iu >= 1001) sum1001++; 
    if (iu == 1000) sum1000++; 
    if (iu == 999) sum0999++; 
    if (iu == 1) sum01++; 
    if (iu == 0) sum00++; 
    if (iu <= -1) sum99++; 
  }

  std::cout << sum1001 << std::endl;
  std::cout << sum1000 << std::endl;
  std::cout << sum0999 << std::endl;
  std::cout << sum01 << std::endl;
  std::cout << sum00 << std::endl;
  std::cout << sum99 << std::endl;

  return 0;
}

