Bài 1:
uses crt;
var i,t:integer;
begin
clrscr;
t:=0;
for i:=1 to 15 do
t:=t+i;
writeln('tong cac so tu 1 toi 15 la: ',t);
readln;
end.
Bài 2:
uses crt;
var i,t:integer;
begin
clrscr;
t:=0;
for i:=1 to 20 do
if i mod 2=1 then t:=t+i;
writeln('tong cac so le trong pham vi tu 1 toi 20 la: ',t);
readln;
end.