python中连乘怎么算?
1、Python中连乘的代码:
sum = 1;n = int(input("Please input number n:"))
for i in range(1,n+1):
sum = sum*i;
if i<n:
print(i,end='')
print("*",end = '')
print(i,"=",sum)
2、运行结果
以上是 python中连乘怎么算? 的全部内容, 来源链接: utcz.com/z/527593.html
1、Python中连乘的代码:
sum = 1;n = int(input("Please input number n:"))
for i in range(1,n+1):
sum = sum*i;
if i<n:
print(i,end='')
print("*",end = '')
print(i,"=",sum)
2、运行结果
以上是 python中连乘怎么算? 的全部内容, 来源链接: utcz.com/z/527593.html