daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest May 16th, 2018 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char *argv[])
  4. {
  5.   int f1 = 1,
  6.     f2 = 1,
  7.     f = 0;
  8.  
  9.   for (int i = 3; i < 20; i++)
  10.     {
  11.       f = f1 + f2;
  12.       f1 = f2;
  13.       f2 = f;
  14.     }
  15.  
  16.   printf("fib(19)=%d\n", f);
  17. }
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