đơn giản
uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{---------------------------xuat------------------------}
for i:=1 to n do
write(a[i]:4);
{---------------------------xu-ly-----------------------}
writeln;
writeln('cac phan tu chia het cho 7 trong day la: ');
for i:=1 to n do
if a[i] mod 7=0 then write(a[i]:4);
writeln;
writeln('cac phan tu chia het cho 3 trong day la: ');
for i:=1 to n do
if a[i] mod 3=0 then write(a[i]:4);
readln;
end.