Как выполнить реверс максимального и минимального элементов массива в этой программе? ПАСКАЛЬ
const n = 10;
type mass = array[1..n] of integer;
var
a: mass;
i, k, max,c, min, j: integer;

begin
randomize;
for i := 1 to n do
A[i] := random(20)-10;
for i := 1 to n do
write(a[i]:3);
writeln();

max := 1;
for j := 1 to n - 1 do begin
for i := j + 1 to n do
if a[i] > max then
max := a[i];
end;
Writeln(Max) ;

min:=1;
for j:=1 to n-1 do begin
for i := j + 1 to n do
if a[i] end;
writeln(min);
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2025 SCHOLAR.TIPS - All rights reserved.