AndreiL
Welcome to AndreiL.
Enjoy your time.
Please log in.

Factorizing

Go down

Factorizing

Post by Lucaci Andrei on Mon Feb 13, 2012 5:28 am

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'''
Created on Jan 19, 2012

@author: sin
'''
while True:
print """Factorizare"""
print "Numar maxim: 999"

def facts(n):
if n == 0:return 0
elif n == 1:return n
else:
return n * facts(n - 1)

l = input("l= ")
if l > 999:
print l, ">999."
raw_input("Press any key to exit...")
break
print facts(l)





avatar
Lucaci Andrei
"Tata Lor"


Number of messages : 222
Points : 2266743
Reputation : 1007
Registration date : 2008-08-15
Age : 25
Location : Cluj-Napoca

View user profile http://www.andreil.wgz.ro

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum