Answers for "program factorial of a number"

3

factorial program

#factorial of n integer
a=int(input('Enter a number :'))
fact=1
for i in range(1,n+1):
 fact*=i
print('Factorial of',a,'is',fact)
Posted by: Guest on December-10-2021
8

program python factorial

#easy way to find factorial of number with while
b=1
a=int(input('the number to be entered'))
c=1
while c<=a:
    b*=c
    c+=1
print('factorial',a,'is',b)

#output:
the number to be entered x
factorial x is x!
+-+-+-+-+-+-+-+-+++-+-+-+-+-+-+++-+-+++-+++-+-++-+-A
Posted by: Guest on November-28-2021

Code answers related to "program factorial of a number"

Python Answers by Framework

Browse Popular Code Answers by Language