Program Menghitung_Faktorial;
uses wincrt;
var
N , ul : integer;
fak : real;
begin
repeat
writeln(' masukkan angka -> '); readln(N);
if N<0 then
writeln(' SILAHKAN CARI ANGKA LAIN');
until N>=0;
fak :=1 ;
if N=0 then
fak :=1;
for ul := 1 to n do
begin
fak := ul*fak;
writeln(ul, '':3, fak:6:0);
end;
end.
0 Komentar:
Posting Komentar