Var a: array [1..10] of Integer; i, min, sum: integer; begin for i := 1 to 10 do begin a[i] := random(50); writeln('[', i, '] => ', a[i]); end; min := a[1]; for i := 2 to 10 do if (min > a[i]) then min := a[i]; i := 1; while ((i <= 10) and (a[i] <> min)) do begin sum := sum + a[i]; inc(i); end; writeln(sum); end.
i, min, sum: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(50);
writeln('[', i, '] => ', a[i]);
end;
min := a[1];
for i := 2 to 10 do
if (min > a[i]) then min := a[i];
i := 1;
while ((i <= 10) and (a[i] <> min)) do
begin
sum := sum + a[i];
inc(i);
end;
writeln(sum);
end.