program raf105;
var a:array[1..15] of integer;
a2,a3,i:integer;
begin
repeat
a2:=0;
a3:=0;
for i:=1 to 15 do
a[i]:= random(2,3);
if a[i]=2
then a2:= a2+1
else a3:= a3+1;
end;
until (a2=7) and (a3=8);
write('Вывод: ');
write(a[i],' ');
end.
Язык программирования PascalABC
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program raf105;
var a:array[1..15] of integer;
a2,a3,i:integer;
begin
repeat
a2:=0;
a3:=0;
for i:=1 to 15 do
begin
a[i]:= random(2,3);
if a[i]=2
then a2:= a2+1
else a3:= a3+1;
end;
until (a2=7) and (a3=8);
write('Вывод: ');
for i:=1 to 15 do
write(a[i],' ');
end.
Язык программирования PascalABC