eg0rmaffin

copipaste_shitcode

Jul 6th, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3.                             Online C Compiler.
  4.                 Code, Compile, Run and Debug C program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <stdio.h>
  10.  
  11.  
  12. int
  13. ft_fibonacci (int index)
  14. {
  15.   int z = 0;
  16.   while ((z * z) < index)
  17.     {
  18.       z++;
  19.     }
  20.   if ((z * z) > index)
  21.     {
  22.       return (0);
  23.     }
  24.   else
  25.     {
  26.       return (z);
  27.     }
  28.  
  29. }
  30.  
  31.  
  32.  
  33.  
  34. int
  35. main ()
  36. {
  37.   int index;
  38.   ft_fibonacci (index);
  39.   printf ("%d", ft_fibonacci (36));
  40. }
Advertisement
Add Comment
Please, Sign In to add comment