Vocaloid - Gumi

Music Player

Rabu, 04 Februari 2015

Ini program faktorial

var a : longint;
function handsome(x:longint):longint;
  var i,j,k : longint;
  begin
   if x=0 then
    handsome:=1
   else
    handsome:=(x * handsome(x-1));
  end;


begin
 writeln ('Masukkan angka');
 readln (a);
 writeln (handsome(a));
end.