SHARE
TWEET

Untitled

a guest Nov 15th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     int n;
  3.     cout<<"Ile liczb Fibonacciego?: ";
  4.     cin>>n;
  5.     long long liczby[n+1];
  6.     liczby [0];
  7.     liczby [1];
  8.     for(int i=2; i<=n; i++)
  9.     liczby [i]=liczby [i-1]+liczby [i-2];
  10.    
  11.     for(int i=0; i<=n;i++)
  12.     cout<<"F("<<i<<")="<<liczby[i]<<endl;
  13.  
  14.  
  15. return 0;
  16.  
  17.  
  18. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top