Delphi - Program Menghitung Faktorial









Button Hitung
procedure TForm2.Button1Click(Sender: TObject);
var i, n : integer;
    nfakt : longint;
begin
  n:=strtoint(edit1.Text);
    nfakt:=1;
    for i := 2 to n do
       nfakt:=nfakt*i;
    edit2.text:=inttostr(nfakt)
end;
end.

Share on Google Plus

About Stevanina

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment