Câu 1:
Uses crt;
Var a:array[1..100] of integer;
I,n,t:integer;
Begin
Clrscr;
Write('nhap n='); readln(n);
For i:=1 to n do
Begin
Write('a[',i,']='); readln(a[i]);
End;
T:=0;
For i:=1 to n do
If (a[i]>0) and (a[i] mod 3=0) then t:=t+a[i];
Writeln(t);
Readln;
End.