Created
April 14, 2014 20:08
-
-
Save davidad/10678998 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
#include <stdlib.h> | |
#include <stdio.h> | |
extern unsigned long fib(unsigned long); | |
int main(int argc, char* argv[]) { | |
if(argc<2) printf("usage: fib_test <integer>\n"), exit(1); | |
unsigned long input = strtoul(argv[1],NULL,10); // string to unsigned long | |
printf("fib(%lu) = %lu\n",input,fib(input)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment