Сформировать целочисленный массив (6*6), заполненный случайным образом числами из промежутка [-50;50] ПАСКАЛЬ! ПОМОГИТЕЕ
Program Z1;
uses crt;
const N=6;
var A:array [1..N,1..N] of integer;
i,j:integer;
begin
ClrScr;
for i:=1 to N do
for j:=1 to N do
A[i,j]:=Random(101)-50;
write (A[i,j]:4);
end;
writeln;
end.
Program Massiv;
Uses Crt;
var i,j:integer;
a: array[1..6,1..6] of integer;
clrscr;
randomize;
for i:=1 to 6 do begin for j:=1 to 6 do begin a[i,j]:=random(101)-50; end; end;
for i:=1 to 6 do begin for j:=1 to 6 do begin write(a[i,j]:3); end; writeln; end;
readkey;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Program Z1;
uses crt;
const N=6;
var A:array [1..N,1..N] of integer;
i,j:integer;
begin
ClrScr;
for i:=1 to N do
begin
for j:=1 to N do
begin
A[i,j]:=Random(101)-50;
write (A[i,j]:4);
end;
writeln;
end;
end.
Program Massiv;
Uses Crt;
var i,j:integer;
a: array[1..6,1..6] of integer;
begin
clrscr;
randomize;
for i:=1 to 6 do
begin
for j:=1 to 6 do
begin
a[i,j]:=random(101)-50;
end;
end;
for i:=1 to 6 do
begin
for j:=1 to 6 do
begin
write(a[i,j]:3);
end;
writeln;
end;
readkey;
end.