SHARE
TWEET

Fibonacci (Python)

haopoka Feb 14th, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def fibo(a):
  2.     if(a==1):
  3.         return 1
  4.     if (a==2):
  5.         return 2
  6.     return fibo(a-1)*fibo(a-2)
  7.  
  8. x = int(input("Nhập một số nguyên <100: "))
  9. print("Số fibonacci của ",x," là ",fibo(x))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top