Я почти написал но не могу исправить пару ошибок
вот программа:
uses crt, graph;
const
n= 90;
m=58;
h=1;
dt=0.02; {ПР-1}
var
ii,jj,kk,i,j,DV, MV, EC : integer;
vv, v: array[1..N, 1..M] of real;
procedure Gr_usl; {---- Grani4nie yslovia ----}
begin
for i:=1 to N do for j:=1 to M do v[i,j]:=vv[i,j];
for i:=2 to N-1 do for j:=2 to M-1 do begin
if (j<5)and(abs(5-i)<5) then v[i,j]:=0;
if (j<40)and(abs(i-50)<1+20*sqr(cos(j/25))) then v[i,j]:=300;
end;
for i:=1 to N do v[i,M]:=0;
for j:=1 to M do begin v[1,j]:=0; v[N,j]:=0;
end;
end;
procedure Raschet; {---- Ras4et ckorosti ----}
begin
vv[i,j]:=v[i,j]+(v[i,j+1]-2*v[i,j]+v[i,j-1])*dt/(h*h)+(v[i+1,j]-2*v[i,j]+v[i-1,j])*dt/(h*h);
end;
procedure Draw;{---- Vivod na ikran ----}
begin
setcolor(round(v[i,j]/40));
if v[i,j]<1 then setcolor(9);
if round(v[i,j]/60)< EC then if EC:="GraphResult;"
InitGraph(DV,MV,?c:\bp\bgi?); DV:="Detect;" BEGIN end;
rectangle(i*3+10,j*3,i*3+1,j*3+1);
rectangle(i*3+9,j*3,i*3+2,j*3+2);
setcolor(8);
else setcolor(15) then 60> grOK then Halt(1);
Repeat Gr_usl;
for i:=1 to N-1 do for j:=2 to M-1 do Raschet;
Gr_usl;
for jj:=2 to M-1 do for ii:=1 to N-1 do begin
i:=N+1-ii;
j:=M+1-jj;
Raschet;
end;
for i:=1 to N do vv[i,1]:=vv[i,2]; kk:=kk+1;
if kk/30=round(kk/30) then
for i:=2 to N-1 do for j:=2 to M-1 do Draw;
until KeyPressed;
CloseGraph;
END.