Lời giải:
program hotrotinhoc ;
var a: array[1..32000] of integer;
i,n,dem : integer ;
begin
write('Nhap do dai cua mang :'); readln(n);
writeln('Nhap gia tri cua cac phan tu');
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] mod 5=0 then dem:=dem+1;
write('Trong day so co ',dem',' so chia het cho 5');
readln
end.
uses crt;
var i,n,d:integer;
a:array[1..100]of integer;
begin
write('nhap do dai mang :');readln(n);
d:=0;
for i:=1 to n do begin
readln(a[i]);
if a[i] mod 5=0 then d:=d+1;
end;
writeln(' co ',d,' so chia het cho 5 trong day so');
readln
end.