Bài 1:
uses crt;
var n,i:integer;
s:real;
begin
clrscr;
write('Nhap n='); readln(n);
s:=1;
for i:=1 to n do
s:=s*i;
writeln(n,'!=',s:0:0);
readln;
end.
1).
program oken;
uses crt;
var n,i: integer;
gt: qword;
begin
write('nhap n: '): readln(n);
gt:=1;
for i:=1 to n do gt:=gt*i;
writeln('N!=',gt);
readln;
end.
2).
program tongcacsole;
uses crt;
var t,i:longint;
begin
clrscr;
for i:=1 to 203 do
if i mod 2 = 1 then t:=t+i;
write(t);
end.
3).
program tongcacsochan;
uses crt;
var t,i:longint;
begin
clrscr;
for i:=1 to 20 do
if i mod 2 = 0 then t:=t+i;
write(t);
end.