1)
var arr: array [1..12] of integer;
begin
for var i := 1 to 12 do
arr[i] := random(-48, -83);
writeln(arr[3] + ' ' + arr[7] + ' ' + arr[11]);
end.
2)
var arr: array [1..9] of double;
for var i := 1 to 9 do
arr[i] := random(15, 40);
write(arr[i] + ' ');
end;
writeln();
var max := arr[1];
for var i := 2 to 9 do
if max < arr[i] then
max := arr[i];
writeln('Max: ' + max);
3)
var arr: array [1..15] of integer;
arr[i] := random(-10, 35);
write('Нечетные: ');
if not arr[i] mod 2 = 0 then
1)
var arr: array [1..12] of integer;
begin
for var i := 1 to 12 do
arr[i] := random(-48, -83);
writeln(arr[3] + ' ' + arr[7] + ' ' + arr[11]);
end.
2)
var arr: array [1..9] of double;
begin
for var i := 1 to 9 do
begin
arr[i] := random(15, 40);
write(arr[i] + ' ');
end;
writeln();
var max := arr[1];
for var i := 2 to 9 do
begin
if max < arr[i] then
max := arr[i];
end;
writeln('Max: ' + max);
end.
3)
var arr: array [1..15] of integer;
begin
for var i := 1 to 9 do
begin
arr[i] := random(-10, 35);
write(arr[i] + ' ');
end;
writeln();
write('Нечетные: ');
for var i := 1 to 9 do
begin
if not arr[i] mod 2 = 0 then
write(arr[i] + ' ');
end;
end.
1)
var arr: array [1..12] of integer;
begin
for var i := 1 to 12 do
arr[i] := random(-48, -83);
writeln(arr[3] + ' ' + arr[7] + ' ' + arr[11]);
end.
2)
var arr: array [1..9] of double;
begin
for var i := 1 to 9 do
begin
arr[i] := random(15, 40);
write(arr[i] + ' ');
end;
writeln();
var max := arr[1];
for var i := 2 to 9 do
begin
if max < arr[i] then
max := arr[i];
end;
writeln('Max: ' + max);
end.
3)
var arr: array [1..15] of integer;
begin
for var i := 1 to 9 do
begin
arr[i] := random(-10, 35);
write(arr[i] + ' ');
end;
writeln();
write('Нечетные: ');
for var i := 1 to 9 do
begin
if not arr[i] mod 2 = 0 then
write(arr[i] + ' ');
end;
end.