Skip to content

Commit

Permalink
factorial by math function
Browse files Browse the repository at this point in the history
  • Loading branch information
linrakesh committed Mar 26, 2019
1 parent 7ea7ec8 commit c57fc21
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions factorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
# Licence: MIT-2.0
#-------------------------------------------------------------------------------
#! python3
fact=1
n = int(input("Enter any integer no : "))
for i in range(1,n+1):
fact = fact*i
print ("Factoril of" + str(n) +" is :" + str(fact))
import math

# fact=1
# n = int(input("Enter any integer no : "))
# for i in range(1,n+1):
# fact = fact*i
# print ("Factoril of" + str(n) +" is :" + str(fact))

print(math.factorial(10))

0 comments on commit c57fc21

Please sign in to comment.