This nice Blogger theme is compatible with various major web browsers. You can put a little personal info or a welcome message of your blog here. Go to "Edit HTML" tab to change this text.
RSS

Minggu, 20 Desember 2009

FUNCTION FAKTORIAL

uses wincrt;

var

n:integer;

FUNCTION Faktorial(M:integer):longint;

begin

         if M=0 then

         Faktorial:=1

         else

         Faktorial:=M*Faktorial(M-1);

end;

begin

     clrscr;

     writeln('Faktorial');

     write('Berapa faktorial: ');readln(n);

     writeln(n,'! = ',Faktorial(n));

end.

0 komentar:

Posting Komentar