Monday, April 4, 2011
Procedure Faktorial ( Pemrograman Terstruktur )
Posted by Dendi Prana Yudha in
Kuliah
program coba;
uses crt;
var z,a : integer;
procedure faktorial;
begin
if z = 0
then
begin;
z := 1
end
else if
z = 2
then
begin;
a:=1;
end
else
z := z*(z-1)*a;
end;
begin
clrscr;
z:= 4;
a := z - 2;
faktorial;
writeln (z);
readln;
end.
0 komentar:
Post a Comment
Tinggalkan Komentar Disini