COMPUTER SCIENCE PYTHON AND C++
Monday, June 29, 2020
pyhton Recursive Program for Fcatorial Calculation
def
factorial
(
n
)
:
if
n
<=
1
:
return
1
else
:
return
n
*
(
factorial
(
n
-
1
)
)
print
(
factorial
(
5
)
)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment