1:
Program baitap1;
Uses crt;
Var A:array[1..200] of integer;
S,i:integer;
Begin
Clrscr;
S:=0;
For i:=1 to 10 do
Begin
Write('A[',i,']=');
Readln(A[i]);
If (A[i] mod 2=1) then S:=S+A[i];
End;
Writeln('Tong cac phan tu co gia tri le:',S);
Readln
2:
Program baitap2;
Uses crt;
Var A:array[1..200] of integer;
S,i:integer;
Begin
Clrscr;
S:=0;
For i:=1 to 15 do
Begin
Write('A[',i,']=');
Readln(A[i]);
If (A[i] mod 2=0) then S:=S+A[i];
End;
Writeln('Tong cac phan tu co gia tri chan:',S);
Readln
End.
End.