CLS
INPUT
"A="; S$
L =
LEN(S$)
max =
VAL(RIGHT$(S$, 1))
min =
VAL(RIGHT$(S$, 1))
FOR i =
1 TO L
K =
VAL(MID$(S$, i, 1))
IF K
< min THEN
min = K
END IF
IF K
> max THEN
max = K
END IF
NEXT i
PRINT
"max ="; max
<span>PRINT "min ="; min
</span>
Program BP_Sasde;
Uses crt;
Var a:array[1..20] Of integer;
imax,imin,i:integer;
begin
Clrscr;
imin:=20;imax:=0;
for i:=1 to 20 do begin
a[i]:=random(1,20);
if a[i]>imax then imax:=a[i] else imin:=a[i];
writeln(a[i]);
end;
writeln('максимум = ',imax,' а минимум = ',imin);
end.