1)
program chia_het3;
uses crt;
var A:array[1..6] of integer;
i,d:byte;
begin
clrscr;
d:=0;
for i:=1 to 6 do
begin
write('A[',i,']= '); readln(A[i]);
if A[i] mod 3=0 then d:=d+1;
end;
write('Co ',d,' so chia het cho 3');
readln;
end.
2)
program kiem_tra;
uses crt;
var s:string;
begin
clrscr;
write('Nhap xau S: '); readln(s);
if s[1]=s[length(s)] then write('Trung nhau')
else write('Khong trung nhau');
readln;
end.