Вторая

Код:
Program DZ2;
const ni=12; mj=11; lk=10;
type mas = array [1..15] of real;
var s,t,a,b,z,c:real;
    n,m,l:mas;
    i,j,k,r:integer;
function f(x,y:real):real;
 begin
  f:=(x+y)/sqrt(sqr(x)+sqr(y));
 end;
function p(r:integer):real;
 begin
  if r=1 then p:=z else
   p:=p(r-1)+sqr(p(r-1));
 end;
function h(r:integer):real;
 begin
  if r=1 then h:=z+4 else
  h:=sin(h(r-1));
 end;
procedure s_m(si:integer;var ms:mas;Sm:char);
 begin
  writeln('Ischodniy Massiv ',Sm);
  for r:=1 to si do
   begin
    ms[r]:=random(5)-r;
    write(ms[r]:3:0);
   end;
  readln;
  writeln;
 end;
procedure deyst(si:integer;ms:mas;Sm:char;abc:real);
 begin
  writeln('Polu4eniy Massiv ',Sm);
  for r:=1 to si do
   begin
    if ms[r]>15 then
    Begin
     ms[r]:=ms[r]*abc;
    end;
    write(ms[r]:7:2);
   end;
  readln;
  writeln;
 end;
Begin
 randomize;
 write('Vvedite s,t: ');
 readln(s,t);
 a:=f(sqrt(s),s+t)+f(s,t);
 b:=f(t+2,s+2)/f(s,sqrt(t));
 writeln('a = ',a:5:2,' b = ',b:5:2);
 write('Vvedite z: ');
 readln(z);
 c:=p(8)+p(7)*h(5);
 writeln('c = ',c:6:2);
  s_m(ni,n,'N');
  s_m(mj,m,'M');
  s_m(lk,l,'L');
  deyst(ni,n,'N',a);
  deyst(mj,m,'M',0.1);
  deyst(lk,l,'L',c);
 readln
End.