esercizi di matematica con turbo pascal 1.1 su mac

program kramer2;
(* soluzione sistema a due equazioni con Kramer *)
  
  var a1,a2,b1,b2,c1,c2,scelta :integer;
      ds,dx,dy,x,y :real;
  
  
  procedure fine;
  begin
   writeln('premi enter per finire');
   readln;
   exit;
  end;
  
  procedure impossibile;
  begin
   writeln('sistema impossibile');
   fine;
  end;
  
  procedure indeterminato;
  begin
   writeln('sistema indeterminato');
   fine;
  end;
  
  procedure determinato;
  begin
   x:=dx/ds;
   y:=dy/ds;
   writeln('X=',x:4:3);
   writeln('Y=',y:4:3);
   writeln;
   fine;
  end;
  
  procedure dati;
  begin
   writeln('scrivi i coefficienti e i termini noti ');
   writeln('dopo ogni numero premi enter ');
   writeln('del sistema a due equazioni ridotto alla forma normale ');
   writeln('------------------------------------------');
   writeln('per provare inizia con i seguenti valori ');
   writeln('1,2,3...2,4,6....indeterminato ');
   writeln('1,2,3...2,4,7....impossibile ');
   writeln('1,2,3...5,9,7....determinato ..-13..8 ');
   writeln('-------------------------------------------');
   writeln(' a1x + b1y = c1 ');
   writeln(' a2x + b2y = c2 ');
   writeln('-----------------');
   write('a1 =');readln(a1);
   write('b1 =');readln(b1);
   write('c1 =');readln(c1);
   writeln('-------------------');
   write('a2 =');readln(a2);
   write('b2 =');readln(b2);
   write('c2 =');readln(c2);
   writeln('-------------------');
   ds:=a1*b2-a2*b1;
   dx:=c1*b2-c2*b1;
   dy:=a1*c2-a2*c1;
   writeln('-------------------');
   if (ds<>0) then determinato else
   if (ds=0) and (dx<>0) or (dy<>0) then impossibile else
   if (ds=0) and (dx=0) and (dy=0) then indeterminato else;
   writeln('premi 1 per altro sistema');
   writeln('premi 2 per finire ');
   write('scelta 1 o 2 ? ');readln(scelta);
   clearscreen;
   case scelta of
   1:dati;
   2:exit;
   end;
   end;
  
   begin
    clearscreen;
    dati;
  
    end.