1)
Код
uses crt;
const n=5;
var x:array[1..n] of integer;
s1,s2,s3:integer;
i:integer;
Begin
clrscr;
s1:=0;
s2:=0;
s3:=0;
for i:=1 to n do
begin
readln(x[i]);
if x[i]>0 then inc(s1)
else if x[i]<0 then inc(s2)
else inc(s3);
end;
writeln;
writeln('"+" ',s1);
writeln('"-" ',s2);
writeln('"0" ',s3);
readln;
end.
2)
Код
uses crt;
const n=5;
var x:array[1..n] of integer;
max,min,t:integer;
i:integer;
Begin
clrscr;
for i:=1 to n do
readln(x[i]);
max:=1;
min:=1;
for i:=2 to n do
begin
if x[i]>x[max] then
max:=i;
if x[i]<x[min] then
min:=i;
end;
writeln;
writeln('min',x[min]);
writeln('max',x[max]);
t:=x[min];
x[min]:=x[max];
x[max]:=t;
writeln;
for i:=1 to n do
writeln(x[i]);
readln;
End.
Все уже решалось по 100 раз, пользуйтесь поиском!