Senin, 19 April 2010

Tugas akhir modul 4















ALGORIRTMA_FAKTORIAL

DEKLARASI:

n:byte

f:longint

Procedure factorial(input n:byte,output hasil:longint)

DEKLRASI:

Hasil:integer

DESKRIPSI:

If n <= 1 then

Hasil 1

Else

Factorial(n-1,hasil)

Endif

DESKRIPSI:

Read(n)

Factorial(n,f)

Write(f)


Tidak ada komentar:

Posting Komentar