Lời giải :
Câu 1 :
program hotrotinhoc;
var A : array[1..32000] of integer;
i,n,dem : integer;
begin
write('n='); readln(n);
for i:= 1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
dem:=0;
for i:= 1 to n do
if a[i]>0 then dem:=dem+1;
write(dem);
readln
end.
Câu 2:
program hotrotinhoc;
var a,b,tb : integer;
begin
write('a='); readln(a);
write('b='); readln(b);
tb:=(a+b)/2;
write(tb);
readln
end.