1.uses crt;
var n,gt:longint;
begin
clrscr;
repeat
write('nhap so n:');readln(n);
until n>0;
gt:=1;
while n>0 do
begin
gt:=gt*n;
n:=n-1;
end;
writeln('giai thua cua n la:',gt);
readln
end.
2. uses crt;
var a,b,c:real;
begin
clrscr;
write('nhap a=');readln(a);
write('nhap b=');readln(b);
write('nhap c=');readln(c);
if (a*a=b*b+c*c) or (b*=c*c+a*a) or (c*c=a*a+b*b) then writeln('khong phai la tam giac vuong');
readln
end.