Const N = 15; Var B:array[1..N] of integer; Min,Max,i:integer; Begin Randomize; Write('B(',N,'):'); For i:= 1 to N do Begin B[i]:=random(71)+130; Write(' ',B[i]) End; WriteLn; Max:=B[1]; Min:=B[1]; For i:= 2 to N do Begin if B[i]<Min then Min:=B[i]; if B[i]>Max then Max:=B[i] End; WriteLn('Min(B) = ',Min); WriteLn('Max(B) = ',Max); WriteLn('Max(B) - Min(B) = ',Max-Min); End.
N = 15;
Var
B:array[1..N] of integer;
Min,Max,i:integer;
Begin
Randomize;
Write('B(',N,'):');
For i:= 1 to N do
Begin
B[i]:=random(71)+130;
Write(' ',B[i])
End;
WriteLn;
Max:=B[1];
Min:=B[1];
For i:= 2 to N do
Begin
if B[i]<Min then Min:=B[i];
if B[i]>Max then Max:=B[i]
End;
WriteLn('Min(B) = ',Min);
WriteLn('Max(B) = ',Max);
WriteLn('Max(B) - Min(B) = ',Max-Min);
End.