使用while循环语句
循环输入任意数,输入的数累乘,当乘积大于10000时终止循环.
控制台输出式子。例如:
2154811=15840
while循环语句实现以下功能:
循环输入任意数,输入的数累乘,当乘积大于10000时终止循环。
控制台输出式子。例如:
2154811=15840
s,temp=1,[]
while s<=10000:
temp.append(input())
s*=int(temp[-1])
print('*'.join(temp)+'='+str(s))
a=float(input())
print(f'{a}',end='')
s=a
while s<=10000:
a=float(input())
s*=a
print(f'*{a}',end='')
print(f'={s}')