V
viktorija
Здравствуйте! Помогите найти ошибку в программе.
Program zam;
uses crt;
Const n = 30;
d = 51;
Type myarray = Array [1..n] Of Integer;
Procedure Init2(var n1:integer;Var m : myarray );
var i : Integer;
begin
repeat
write('Размер массива от 1 до ',n,'=');
readln(n1);
until n1 in [1..n];
for i:=1 to n1 do
m:=random(d);
end;
Procedure Print1(n1: Integer; m: myarray );
Var i : Integer;
Begin
For i:=1 To n1 Do
Write(m:4);
Writeln;
End;
Procedure zamena (var n1:Integer;Var m:myarray);
Var m:string; i: Integer;
Begin
repeat
readln(m);
i:=1;
while (1<length(m)) do
begin
if (m in ['0'..'9']) then
if odd(i) then
begin
if m='9' then
m:='0'
else
Inc (m);
End;
inc(i);
end;
Begin
clrscr;
Randomize;
Init2(n1,A);
Print1(n1,A);
writeln(m);
Print1 (n1,A);
Readln;
End.
Program zam;
uses crt;
Const n = 30;
d = 51;
Type myarray = Array [1..n] Of Integer;
Procedure Init2(var n1:integer;Var m : myarray );
var i : Integer;
begin
repeat
write('Размер массива от 1 до ',n,'=');
readln(n1);
until n1 in [1..n];
for i:=1 to n1 do
m:=random(d);
end;
Procedure Print1(n1: Integer; m: myarray );
Var i : Integer;
Begin
For i:=1 To n1 Do
Write(m:4);
Writeln;
End;
Procedure zamena (var n1:Integer;Var m:myarray);
Var m:string; i: Integer;
Begin
repeat
readln(m);
i:=1;
while (1<length(m)) do
begin
if (m in ['0'..'9']) then
if odd(i) then
begin
if m='9' then
m:='0'
else
Inc (m);
End;
inc(i);
end;
Begin
clrscr;
Randomize;
Init2(n1,A);
Print1(n1,A);
writeln(m);
Print1 (n1,A);
Readln;
End.