6 лет назад
Поправьте код Паскаль компилятор ругается
var
a:array[1..100] of integer;
n,i,j,k:integer;
begin
randomize;
readln(n);
for i:=1 to n do
begin
a[i]:=random(1,9);
end;
i:=1;
while i<=n do
begin
j:=i+1;
while j<=n do
begin
if a[j]=a[i] then
begin
for k:=j to n-1 do
a[k]:=a[k+1];
n:=n-1;
end
else j:=j+1;
end;
i:=i+1;
end;
if(n mod 2 = 0) then
Writeln('2')
else
Writeln('1');
end.
Ошибка:
source.pas(9,9) Error: Wrong number of parameters specified for call to "Random"
Error: Found declaration: Random(LongInt):LongInt;
Error: Found declaration: Random(Int64):Int64;
Error: Found declaration: Random:Extended;
source.pas(33) Fatal: There were 4 errors compiling module, stopping
Error: /usr/bin/ppcx64 returned an error exitcode
Только авторизированные пользователи могут оставлять свои ответы
Дата
Популярность
random требует 1 параметр, а ты задаешь два
1+random(9)