Program qwe; Uses crt; var x:array[1..12] of real; i:integer; min,max:real; begin clrscr; Writeln('Введите елементы масыву'); for i:=1 to 12 do begin Readln(x[i]); end; max:=x[1]; min:=x[1]; For i:=1 to 12 do begin if max<x[i] then max:=x[i]; if min>x[i] then min:=x[i]; end; Writeln('Max: ',max:2:2); Writeln('Min: ',min:2:2); readkey; end.
Uses crt;
var x:array[1..12] of real;
i:integer;
min,max:real;
begin
clrscr;
Writeln('Введите елементы масыву');
for i:=1 to 12 do
begin
Readln(x[i]);
end;
max:=x[1];
min:=x[1];
For i:=1 to 12 do
begin
if max<x[i] then max:=x[i];
if min>x[i] then min:=x[i];
end;
Writeln('Max: ',max:2:2);
Writeln('Min: ',min:2:2);
readkey;
end.