Program HOC24;
var a: array[1..1000] of integer;
i,n,d: integer;
begin
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 3=0 then d:=d+1;
write('Co ',d,' so chia het cho 3');
readln
end.
Đúng 0
Bình luận (0)