Напишите программу, которая находит в массиве [12; 182] количество элементов, делящихся на 5, напечатать исходный массив.массив заполнить случайным образом. на языке питон.
Uses graphabc; var i, j: integer; ar: array[1..10]of integer; b: boolean;
label l1; begin b := false; for i := 1 to 10 do ar[i] := random(10, 300); l1: b := false; for i := 1 to 10 do for j := 1 to 10 do if((ar[i] = ar[j]) or (abs(ar[i] - ar[j]) < 10)) and (i <> j) then begin b := true; ar[i] := random(30, 300); end; if b = true then goto l1; window.Init(0, 0, 800, 600, clwhite); window.IsFixedSize := true; randomize; lockdrawing; pen.Width := 5; for i := 1 to 10 do begin pen.Color := rgb(random(0, 255), random(0, 255), random(0, 255)); drawcircle(400, 300, ar[i]); redraw; end; end.
Uses graphabc; var i, j: integer; ar: array[1..10]of integer; b: boolean;
label l1; begin b := false; for i := 1 to 10 do ar[i] := random(10, 300); l1: b := false; for i := 1 to 10 do for j := 1 to 10 do if((ar[i] = ar[j]) or (abs(ar[i] - ar[j]) < 10)) and (i <> j) then begin b := true; ar[i] := random(30, 300); end; if b = true then goto l1; window.Init(0, 0, 800, 600, clwhite); window.IsFixedSize := true; randomize; lockdrawing; pen.Width := 5; for i := 1 to 10 do begin pen.Color := rgb(random(0, 255), random(0, 255), random(0, 255)); drawcircle(400, 300, ar[i]); redraw; end; end.
var
i, j: integer;
ar: array[1..10]of integer;
b: boolean;
label l1;
begin
b := false;
for i := 1 to 10 do ar[i] := random(10, 300);
l1:
b := false;
for i := 1 to 10 do
for j := 1 to 10 do if((ar[i] = ar[j]) or (abs(ar[i] - ar[j]) < 10)) and (i <> j)
then
begin
b := true;
ar[i] := random(30, 300);
end;
if b = true then goto l1;
window.Init(0, 0, 800, 600, clwhite);
window.IsFixedSize := true;
randomize;
lockdrawing;
pen.Width := 5;
for i := 1 to 10 do
begin
pen.Color := rgb(random(0, 255), random(0, 255), random(0, 255)); drawcircle(400, 300, ar[i]);
redraw;
end;
end.
var
i, j: integer;
ar: array[1..10]of integer;
b: boolean;
label l1;
begin
b := false;
for i := 1 to 10 do ar[i] := random(10, 300);
l1:
b := false;
for i := 1 to 10 do
for j := 1 to 10 do if((ar[i] = ar[j]) or (abs(ar[i] - ar[j]) < 10)) and (i <> j)
then
begin
b := true;
ar[i] := random(30, 300);
end;
if b = true then goto l1;
window.Init(0, 0, 800, 600, clwhite);
window.IsFixedSize := true;
randomize;
lockdrawing;
pen.Width := 5;
for i := 1 to 10 do
begin
pen.Color := rgb(random(0, 255), random(0, 255), random(0, 255)); drawcircle(400, 300, ar[i]);
redraw;
end;
end.