Переведите с паскаля на питон
Var a:array[1..20] of integer;
i,min,ind:integer;
begin
randomize;
for i:=1 to 20 do begin
a[i]:=random(100)+100;
write(a[i]:4);
end;
writeln;
min:=a[1]+a[2];
for i:=2 to 19 do
if a[i]+a[i+1] begin
min:=a[i]+a[i+1];
ind:=i;
end;
write('Сумма минимальна между ',ind,' и ', ind+1, ' элементом');
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.