Bài 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] mod 2=0 then t:=t+a[i];
writeln('Tong cac so chan la: ',t);
readln;
end.
Bài 2:
uses crt;
var st,st1,st2:string;
d1,d2,d,i:integer;
begin
clrscr;
write('Nhap ten nguoi thu nhat:'); readln(st1);
write('Nhap ten nguoi thu hai:'); readln(st2);
st:=' ';
d1:=length(st1);
for i:=1 to d1 do
st:=st+st1[i];
d2:=length(st2);
for i:=1 to d2 do
st:=st+st2[i];
d:=length(st);
for i:=d downto 1 do
write(st[i]);
readln;
end.