shouldz

fibonacci

Jul 3rd, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.10 KB | None | 0 0
  1. a, b = 0, 1
  2. n = int(input('Até que número deseja: '))
  3. while b < n+1:
  4. print(b)
  5. a, b = b, a+b
Advertisement
Add Comment
Please, Sign In to add comment