Program1.pas(17) : Нельзя изменять значение переменной цикла внутри этого цикла Помогите исправить ошибку .
         Program Lin_10;
uses crt ;
type mas = array [1..9,1..9] of integer ;
var D,b:mas;
i,j,t,min:integer ;
Begin
clrscr;
Randomize ;
for i:=1 to 9 do begin
for j:=1 to 9 do begin
D[i,j]:=random(30)-60;
 Write(D[i,j]:4);
 End; 
Writeln;     
 Writeln(' Задача 10_1 ') ;
for i:=1 to 9 do 
for j:=1 to 9 do begin 
min:=D[i,j]; 
End; 
If min>D[i,j] then min:=[i,j];
 End; 
Writeln ;
 Writeln('Min=',min); 
     Writeln(' Задача 10_2 ');
 for i:=1 to 9 do begin
 for j:=1 to 9 do begin
 If (D[i,j] mod 2) = 0 then
 D[i,j]:=0 ; 
Write(D[i,j]:4); 
End;  Writeln; 
   Writeln(' Задача 10_3 '); 
    t:=1;
 for j:=1 to 9 do begin
 i:=j; 
B[t]:=D[i,j];
 t:=t+1; 
u:=t; End;
For t:=1 to u-5 do begin
Write (D[t]:4);
End;
Writeln; 
 Writeln(' Задача 10_4 ');   
Writeln(' Задача 10_5 ');
sum:=0;
for i:=1 to 9 do
 For j:=1 to 9 do begin
If D[i,j] mod 3 = 0 then
 Sum:=sum+D[i,j];
End;
Write('sum=',sum);
Readln;
End;
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2025 SCHOLAR.TIPS - All rights reserved.