const n=5;
var a: array[1..n] of integer;
i,x,k: integer;
begin
randomize;
write('x=');
readln(x);
k:=0;
write('massiv: ');
for i:=1 to n do begin
a[i]:=random(201)-100;
write(a[i],' ');
if a[i]>x then k:=k+1;
end;
writeln;
write('k=',k);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
const n=5;
var a: array[1..n] of integer;
i,x,k: integer;
begin
randomize;
write('x=');
readln(x);
k:=0;
write('massiv: ');
for i:=1 to n do begin
a[i]:=random(201)-100;
write(a[i],' ');
if a[i]>x then k:=k+1;
end;
writeln;
write('k=',k);
end.