Quote Originally Posted by QuantumPete View Post
I just tested it and though it should be an "<=" instead of just "<", it does work properly and returns immediately.

QuantumPete
Wow. You are correct (except the first number is 0...).

Using this loop to produce the first 45 (I think it wraps after that) did take more than a minute tho, whereas the iteritive one is instant:

Code:
int main (int argc, char *argv[]) {
	int answer,i;
	
	for (i=1;i<=atoi(argv[1]);i++) {
		answer=fib(i);
		printf("%d ", answer);
	}
}