1)
uses crt;
var a:array [1..15] of integer;
i,k:integer;
begin
randomize;
k:=0;
for i:=1 to 15 do
begin
a[i]:=random(10)-3;
if (a[i]<0) then inc(k);</em>
write (a[i],' ');
end;
writeln;
writeln (k/15*100,'%');
end.
2)
uses crt;
var a:array [1..20] of integer;
i:integer;
begin
randomize;
for i:=1 to 20 do
begin
a[i]:=random(30);
write (a[i],' ');
end;
writeln;
for i:=1 to 20 do
if (a[i] mod 10 = 3) then write (a[i],' ');
end.
3)
uses crt;
var a:array [1..20] of integer;
i:integer;
k:longint;
begin
randomize;
k:=1;
for i:=1 to 20 do
begin
a[i]:=random(30);
write (a[i],' ');
if (a[i]>9) and (a[i]<100) then k:=k*a[i];</em>
end;
writeln;
writeln (k);
end.
4)
uses crt;
var a:array [1..30] of integer;
i:integer;
flag:boolean;
begin
randomize;
for i:=1 to 30 do
begin
a[i]:=random(30);
write (a[i],' ');
end;
writeln;
flag:=true;
for i:=1 to 29 do
if (a[i]>a[i+1]) then
begin
flag:=false;
break;
end;
writeln (flag);
end.