*Xuất các số chia hết cho 5:
uses crt;
var n,i:longint; a:array[1..1000000]of longint;
begin
clrscr;
write('Nhap N: ');readln(n);
for i:=1 to n do
begin
write('a[',i,']=');readln(a[i]);
end;
write('Cac so chia het cho 5: ');
for i:=1 to n do
if a[i] mod 5=0 then write(a[i],' ');
readln
end.
*Đếm các số chia hết cho 5:
uses crt;
var n,i,d:longint; a:array[1..1000000]of longint;
begin
clrscr;
write('Nhap N: ');readln(n);
for i:=1 to n do
begin
write('a[',i,']=');readln(a[i]);
end;
d:=0;
for i:=1 to n do
if a[i] mod 5=0 then inc(d);
write('Co ',d,' so chia het cho 5');
readln
end.