1) Type mang=array [1..20] of integer;
var a:mang; i,n,max,min:integer;
begin
readln(n);
for i:=1 to n dO
begin
readln(a[i]);
end;
max:=a[1]; min:=a[1];
for i:=2 to n do
begin
if max < a[i] then max:=a[i];
if min > a[i] then min:=a[i];
end;
writeln(min); writeln(max);
readln;
end.
2) type mang=array [1..20] of integer;
var a:mang; n,i,tong,tich:integer;
begin
readln(n); tong:=0; tich:=1
for i:=1 to n do
begin
readln(a[i]);
end;
for i:=1 to n do tong:=tong+a[i];
for i:=1 to n do tich:=tich*a[i];
end;
writeln(tong); writeln(tich);
readln;
end.
1...
program baio1;
var a:array[1..100] of real;
n,i:longint;
begin
repeat
write('N= ');readln(n);
until n>0;
for i:=1 to n do
begin
write('a[,i,']= ');
readln(a[i]);
END;
max:=a[1];min:=a[1];
for i:=1 to n do
if a[i]>max then max:=a[i]
else min:=a[i];
write('...');
readln
end.