uses crt; var arr: array[1..100] of integer; n, x, count, i, tich: integer; begin clrscr; write(‘Hay nhap so nguyen n: ‘); readln(n); for i := 1 to n do begin write(‘Hay nhap phan tu arr[‘, i, ‘]: ‘); readln(arr[i]); end; write(‘Mang ban vua nhap la: ‘); for i := 1 to n do write(arr[i], ‘ ‘); writeln; write(‘Hay nhap so nguyen X: ‘); readln(x); tich := 1; for i := 1 to n do begin if arr[i] > x then begin tich := tich * arr[i]; count := count + 1; end; end; writeln(‘Co ‘, count, ‘ so lon hon ‘, x, ‘.’); writeln(‘Tich cua cac so lon hon ‘, x ,’ la: ‘, tich); readln; end.
uses crt;
var n,i,x,d:integer;
m:longint;
a:array[1..100] of integer;
begin
clrscr;
d:=0;
m:=1;
readln(n);
for i:=1 to n do readln(a[i]);
readln(x);
for i:=1 to n do
begin
if a[i]>x then
begin
d:=d+1;
m:=m*a[i];
end;
end;
write(d:2,m);
readln;
end.
uses crt;
var arr: array[1..100] of integer;
n, x, count, i, tich: integer;
begin
clrscr;
write(‘Hay nhap so nguyen n: ‘);
readln(n);
for i := 1 to n do
begin
write(‘Hay nhap phan tu arr[‘, i, ‘]: ‘);
readln(arr[i]);
end;
write(‘Mang ban vua nhap la: ‘);
for i := 1 to n do
write(arr[i], ‘ ‘);
writeln;
write(‘Hay nhap so nguyen X: ‘);
readln(x);
tich := 1;
for i := 1 to n do
begin
if arr[i] > x then
begin
tich := tich * arr[i];
count := count + 1;
end;
end;
writeln(‘Co ‘, count, ‘ so lon hon ‘, x, ‘.’);
writeln(‘Tich cua cac so lon hon ‘, x ,’ la: ‘, tich);
readln;
end.