procedure TForm1.Button1Click(Sender: TObject);
var
carpim,n,i:integer;
begin
carpim:=1;
n:=strtoint(edit1.text);
begin
if n=0 then
edit2.text:='1'
else
for i:=1 to n do
begin
carpim:=carpim*i;
edit2.text:=inttostr(carpim);
end;
end;
end;
end.
Hiç yorum yok:
Yorum Gönder