program hamfa;
user crt;
var A: array[1..50] of integer;
n, i, x, s, j, t, l, k: integer;
begin
clrscr;
write('Nhap n = '); readln(n);
s:=0;
for i:=1 to n do
begin
write('A[', i, '] = '); readln(A[i]);
s:=s+A[i]:
end;
writeln('a) Tong = ', s);
s:=0;
write('Nhap x = '); readln(x);
for i:=1 to n do if A[i]=x then s:=i;
if s=0 then writeln('b) Khong co') else writeln('b) Vi tri = ', s);
l:=1;
for i:=1 to n do
begin
if i mod 2 = 0 then k:=i*i*i;
l:=l*k;
end;
write('c) Tich lap phuong = ', l);
for i:=1 to n-1 do
for j:=i to n do if A[i]>A[j] then
begin
t:=A[i];
A[i]:=A[j];
A[j]:=t;
end;
write('d) Sap xep: ');
for i:=1 to n do write(A[i]);
t:=0;
for i:=1 to n do
begin
s:=0;
for j:=1 to i do if i mod j = 0 then s:=s+1;
if s=2 then t:=t+1;
end;
write('e) So phan tu nguyen to = ', t);
readln
end.