program hayat2;
{$APPTYPE CONSOLE}

uses
SysUtils;
var
x , y , z : integer ;
h,Reply: char ;
begin
  Reply := 'Y';
    WriteLn('start');
    while( (Reply = 'Y') or (Reply = 'y') ) do
    begin

  Write('Number one: ');
  readln(x);

  WriteLn('');
  WriteLn('Select Method:');
  writeln ('a',' addition');
  writeln ('b',' subtractin');
  writeln ('c',' multiplication');
  writeln ('d',' division');
  writeln ('e',' square');
  writeln (' ##################### ' );
  readln(h);
  WriteLn('');

  Write('Number two:');
  readln(y);

  case (h) of
  'a' :begin
  z:= x + y ;
  writeln ('the result of add is ' , z );
  WriteLn('');
  end;
  'b' : begin
  z:= x - y ;
  writeln ('the result of subtract is ' , z );
  writeln('');
  end;
  'c' : begin
  z:= x * y ;
  writeln ('the result of multiply is ' , z );
  writeln('');
  end;
  'd' : begin
  z:= x div y ;
  writeln ('the result of divide is ' , z );
  writeln('');
  end;
  'e' : begin
  z:=  sqr (x + y) ;
  writeln ( ' the result of square is ' , z );
  writeln('');
  end
  else
    begin
    WriteLn('Unknown');
    WriteLn('');
    end;
    end;
    WriteLn('start');
    end;
end.
