Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

# Fungsi Rekursif faktorial

def faktorial(n):
if n <= 1:
return 1
else:
return n*faktorial(n-1)
#Program utama
for n in range(11):
print "%d! = %d" % (n, faktorial(n))
while True:
try:
n=input('Nilai n! : ')
print 'Faktorial %d! = %

You might also like