Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#include <stdio.h>
int main(int argc, const char * argv[])
short unsigned int i;
short unsigned int fib[15];
fib[0] = 0;
fib[1] = 1;
printf("1 %i\n", fib[0]);
printf("2 %i\n", fib[1]);
for (i=2; i<15; i++) {
fib[i] = fib[(i-2)] + fib[(i-1)];
printf("%i %i\n", (i+1), fib[i]);
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment