My code works except for the break statement, and I can't figure out why. Basically, I need to find the first instance in the fibonacci sequence that the terms evaluate to the golden ratio with five decimal places, which is a fancy way to say
((fibonacci[x]+fibonacci[x-1])/fibonacci[x])
must equal 1.61803
My output works fine, so I know the numbers are being calculated, but the statement does not break... I have no idea what's wrong. Anyway, here's the code.
I figured it out. I was using the abs() function which only works with ints (because I have to include the C version of the library, because my compiler is silly). I had to use fabs() to get the float version. Thanks for all your help!