SHARE
TWEET

Untitled

a guest Jan 21st, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n,i;
  5.     scanf("%d",&n);
  6.     for(i=0;i<=n;i++)
  7.     printf("%d\t",fibo(i));
  8. }
  9. int fibo(int n)
  10. {
  11.     if(n==0||n==1)
  12.         return n;
  13.     else
  14.         return (fibo(n-2)+fibo(n-1));
  15. }
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