Created
November 3, 2019 04:42
-
-
Save parzibyte/004799b97f65838f4646b0715607a0da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long fibonacci(long posicion, int imprimir) { | |
long siguiente = 1, actual = 0, temporal = 0; | |
for (long x = 1; x <= posicion; x++) { | |
if (imprimir) | |
printf("%ld, ", actual); | |
temporal = actual; | |
actual = siguiente; | |
siguiente = siguiente + temporal; | |
} | |
if (imprimir) | |
printf("%ld", actual); | |
return actual; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi parzibyte,
I am learning currently C programm at uni and trying to understand the code you have shared, when I put it in the compiler cannot compile, have added stdio.h libraries but still nothing... could you share what you think am doing wrong :) beginners problems I believe