📜  程序 python 阶乘 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:16.346000             🧑  作者: Mango

代码示例1
#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