Дамп всех задач
This commit is contained in:
14
Pascal/три задачи/2.pas
Normal file
14
Pascal/три задачи/2.pas
Normal file
@@ -0,0 +1,14 @@
|
||||
var
|
||||
i, j, b:integer;
|
||||
mas:array[0..9] of integer;
|
||||
|
||||
begin
|
||||
for i:=0 to 9 do mas[i]:=Random(5);
|
||||
println(mas);
|
||||
for i:=0 to 9 do begin
|
||||
for j:=i+1 to 8 do begin
|
||||
if mas[j] = mas[i] then b:=1;
|
||||
end;
|
||||
end;
|
||||
if b=1 then print('yes') else print('no');
|
||||
end.
|
||||
Reference in New Issue
Block a user