Câu 1:
uses crt;
var i,s:longint;
begin
clrscr;
for i:=1 to 20 do inc(s,i);
writeln('Tong: ',s);
readln;
end.
Câu 2:
uses crt;
var i,s:longint;
begin
clrscr;
for i:=1 to 50 do if i mod 2=0 then inc(s,i);
writeln('Tong cac so chan: ',s);
readln;
end.
Câu 3:
uses crt;
var i,n,gt:longint;
begin
clrscr;
write('Nhap n: '); readln(n);
gt:=1;
for i:=n downto 1 do gt:=gt*i;
writeln(n,'!=',gt);
readln;
end.