Lời giải :
a) write('nhap n='); readln(n);
S1:=0;
for i:=1 to n do S1:= S1+i;
write(S1);
b) S2:=0;
for i:= 1 to 12 do S2:=S2+i;
write(S2);
c) write('nhap n='); readln(n);
S3:=0;
for i:= 1 to n do
if i mod 2 =0 then S3:=S3+i;
write(S3);
d) S4:=0;
for i:=1 to 32 do
if i mod 2 =0 then S4:=S4+i;
write(S4);
e) write('nhap n='); readln(n);
S5:=0;
for i:=1 to n do
if i mod 2=1 then S5:=S5+i;
write(S5);
f) S6:=0;
for i:= 1 to 39 do
if i mod 2=1 then S6:=S6+i;
write(S6);