program test;var a: array[1..10] of integer;m, i: integer;total: longint;begin randomize; total:=1; for i:=1 to 10 do begin a[i]:=random(20)+1; write(a[i], ' '); end; writeln(); write('Enter the number: '); readln(m); for i:=1 to 10 do begin if a[i] > m then total:= total*a[i]; end; if total > 1 then writeln('Total = ', total) else writeln('Error'); readln;end.
program test;
var a: array[1..10] of integer;m, i: integer;
total: longint;
begin
randomize;
total:=1;
for i:=1 to 10 do
begin
a[i]:=random(20)+1;
write(a[i], ' ');
end;
writeln();
write('Enter the number: ');
readln(m);
for i:=1 to 10 do
begin
if a[i] > m then
total:= total*a[i];
end;
if total > 1 then
writeln('Total = ', total)
else
writeln('Error');
readln;
end.