begin
var a := ArrRandom(15, -100, 100); a.Println;
var Min := a[0];
var Count := 1;
for var i := 1 to a.High do
if a[i] = Min then Count += 1
else if a[i] < Min then begin Min := a[i]; Count := 1 end;
Print($'Min = {Min}, Count = {Count}')
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
begin
var a := ArrRandom(15, -100, 100); a.Println;
var Min := a[0];
var Count := 1;
for var i := 1 to a.High do
if a[i] = Min then Count += 1
else if a[i] < Min then begin Min := a[i]; Count := 1 end;
Print($'Min = {Min}, Count = {Count}')
end.