Crossin的编程教室
标题:
习题集6-fabonacci sequence
[打印本页]
作者:
dxm73
时间:
2016-8-4 19:43
标题:
习题集6-fabonacci sequence
本帖最后由 dxm73 于 2016-8-4 20:37 编辑
print('您想看前多少项的斐波那契数列?')
x = int(input())
n=0
m=1
for i in range(1,x):
print(m)
n=n+m
print(n)
m=m+n
欢迎光临 Crossin的编程教室 (https://bbs.crossincode.com/)
Powered by Discuz! X2.5