Карточка 1 (задача 1)
var
a:array [1..6,1..3] of integer;
i,j,k:integer;
begin
randomize;
writeln('Массив:');
for i:=1 to 6 do
for j:=1 to 3 do
if (i=1)and(j=1)then a[i,j]:=random(10) else
if (j=1)then a[i,j]:=a[i-1,3]+5 else
a[i,j]:=a[i,j-1]+5;;
for i:=1 to 6 do
begin
for j:=1 to 3 do
write(a[i,j]:4);
writeln;
end;
end.
Карточка 10 (задача 1)
var
a:array [1..6,1..6] of real;
i,j,k:integer;
begin
writeln('Массив:');
for i:=1 to 6 do
for j:=1 to 6 do
begin
if (i=1)and(j=1) then
begin
writeln('Введите первый элемент:');
readln(a[1,1]);
end
else
if (i=1)and(j=2) then
begin
writeln('Введите второй элемент:');
readln(a[1,2]);
end
else
if (j=1)then a[i,j]:=(a[i-1,6]+a[i-1,5])/2 else
if (j=2)then a[i,j]:=(a[i-1,6]+a[i,1])/2 else
a[i,j]:=(a[i,j-1]+a[i,j-2])/2;
end;
for i:=1 to 6 do
begin
for j:=1 to 6 do
write(a[i,j]:8:2);
writeln;
end;
end.