Skip to content

Instantly share code, notes, and snippets.

@funrep
Created June 7, 2013 20:02
Show Gist options
  • Save funrep/5732007 to your computer and use it in GitHub Desktop.
Save funrep/5732007 to your computer and use it in GitHub Desktop.
#include <stdio.h>
main
{
printf ("%d\n", fib(10));
}
int fib (int num)
{
if (num < 2)
return num;
else return fib(num - 1) + fib(num - 2);
}
@funrep
Copy link
Author

funrep commented Jun 7, 2013

$ cc fib.c
fib.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment