#include <perms.h>

//          Edinburgh IMP77 Compiler - Version 8.4
//
//     1  %begin

int main(int argc, char **argv) { /*%begin*/
  _imp_initialise(argc, argv);

  //     2  %ownlongrealarray a(1:6)=0.99,1.0,1.01,0.99,1.0,1.01;

  static double A[6] = {0.99, 1.0, 1.01, 0.99, 1.0, 1.01};
  struct _imp_dv A_dv = {A, sizeof(double) /*, dims, <bounds> */};

  //     3  %longreal x; %integer i

  double X;
  int I;

  //     4  %for i=1,1,3 %cycle

  // %for I = 1, 1, 3 %cycle
  {
    I = 0;
  L_0001:
    if (I == 3) goto L_0002;
    I += 1;

    //     5  x=a(i)

    X = A[I - 1];

    //     6  %if mod(x)<mod(1.0) %then printstring("less ")

    if (_imp_MOD(X) >= _imp_MOD(1.0)) goto L_0004;
    _imp_PRINTSTRING(_imp_str_literal("less "));
  L_0004:;

  //     7  %if mod(x)=mod(1.0) %then printstring("equal ")

    if (_imp_MOD(X) != _imp_MOD(1.0)) goto L_0005;
    _imp_PRINTSTRING(_imp_str_literal("equal "));
  L_0005:;

  //     8  %if mod(x)>mod(1.0) %then printstring("Greater ")

    if (_imp_MOD(X) <= _imp_MOD(1.0)) goto L_0006;
    _imp_PRINTSTRING(_imp_str_literal("Greater "));
  L_0006:;

  //     9  %if mod(x)<=mod(1.0) %then printstring(" less= ")

    if (_imp_MOD(X) > _imp_MOD(1.0)) goto L_0007;
    _imp_PRINTSTRING(_imp_str_literal(" less= "));
  L_0007:;

  //    10  %if mod(x)#mod(1.0) %then printstring("noteq ")

    if (_imp_MOD(X) == _imp_MOD(1.0)) goto L_0008;
    _imp_PRINTSTRING(_imp_str_literal("noteq "));
  L_0008:;

  //    11  %if mod(x)>=mod(1.0) %then printstring("Greater= ")

    if (_imp_MOD(X) < _imp_MOD(1.0)) goto L_0009;
    _imp_PRINTSTRING(_imp_str_literal("Greater= "));
  L_0009:;

  //    12  %if mod(1.0)<mod(x) %then printstring("less ")

    if (_imp_MOD(1.0) >= _imp_MOD(X)) goto L_000A;
    _imp_PRINTSTRING(_imp_str_literal("less "));
  L_000A:;

  //    13  %if mod(1.0)=mod(x) %then printstring("equal ")

    if (_imp_MOD(1.0) != _imp_MOD(X)) goto L_000B;
    _imp_PRINTSTRING(_imp_str_literal("equal "));
  L_000B:;

  //    14  %if mod(1.0)>mod(x) %then printstring("Greater ")

    if (_imp_MOD(1.0) <= _imp_MOD(X)) goto L_000C;
    _imp_PRINTSTRING(_imp_str_literal("Greater "));
  L_000C:;

  //    15  %if mod(1.0)<=mod(x) %then printstring(" less= ")

    if (_imp_MOD(1.0) > _imp_MOD(X)) goto L_000D;
    _imp_PRINTSTRING(_imp_str_literal(" less= "));
  L_000D:;

  //    16  %if mod(1.0)#mod(x) %then printstring("noteq ")

    if (_imp_MOD(1.0) == _imp_MOD(X)) goto L_000E;
    _imp_PRINTSTRING(_imp_str_literal("noteq "));
  L_000E:;

  //    17  %if mod(mod(1.0))>=mod(x) %then printstring("Greater=")

    if (_imp_MOD(_imp_MOD(1.0)) < _imp_MOD(X)) goto L_000F;
    _imp_PRINTSTRING(_imp_str_literal("Greater="));
  L_000F:;

  //    18  newline

    _imp_NEWLINE();

    //    19  %repeat

    goto L_0001;
  }

L_0002:;

//    20  %endofprogram

  _imp_stop(0);
  return 0;
end_0:;
}