program IExe1;

uses
  //Forms,
  UInterv;

var A,B:TInterval;
begin
  Writeln('Working...');
  Write('Seting Values...');
  A:=ISet(5 , 10);
  B:=ISet(8 , 12);
  WriteLn('Ok.');
  WriteLn('The input values are:',IntervalToStr(A),' and ',IntervalToStr(B));

  Writeln('Binary Operations (Interval -> Interval):');
  Writeln('+ ',IntervalToStr(ISoma(A,B)));
  Writeln('- ',IntervalToStr(ISub(A,B)));
  Writeln('* ',IntervalToStr(IMul(A,B)));
  Writeln('/ ',IntervalToStr(IDiv(A,B)));
  Writeln('U ',IntervalToStr(IUni(A,B)));
  Writeln('I ',IntervalToStr(IInter(A,B)));

  Writeln('Binary Operation (Interval -> Float):');
  Writeln('Dist ',(IDist(A,B)));

  Writeln('Unary Operations (Interval -> Interval):');
  Writeln('-A  ',IntervalToStr(INeg(A)));
  Writeln('1/A ',IntervalToStr(IInv(A)));

  Writeln('Unary Operation (Interval -> Float):');
  Writeln('IMed(A)  ',IMed(A));
  Writeln('IDiam(A) ',IDiam(A));
  WriteLn;
  Writeln(' 5.0 in [3,4]:',IIn(5,ISet(3,4)));      // false
  Writeln(' 3.9 in [3,4]:',IIn(3.5,ISet(3,4)));    // true
  Writeln(' 2.9 in [3,4]:',IIn(2.9,ISet(3,4)));    // false


  Writeln('Done.');

  ReadLn;

end.