1.
Screenshot
Program
2.
Source
Code
program Faktorial;
Uses crt;
Function Fakt(N : integer) : integer;
begin
if N
= 0 then
Fakt
:= 1
else
Fakt
:=N*Fakt(N-1);
end;
Var angka, hasil : integer;
BEGIN
clrscr;
Writeln('-->>> Program Faktorial
<<<--');
writeln;
write(' Nilai Faktorial :
');readln(angka);
hasil:=Fakt(angka);
write(' Hasil : ',hasil);
readkey;
END.
|
Posting Komentar