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.
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.
Tidak ada komentar:
Posting Komentar