taylor Lynch wrote:I have no way to compile this right now. But would this be what your talking about?
sorry - i was updating my reply when you posted this. See my previous post.
taylor Lynch wrote:When i run it like this without the return sum; statement, it compiles just fine. But when i run the program it stops right after you input a number for the variable n.
taylor Lynch wrote:I just dont understand what it means for the code. Also i cant change anything from the Fibonacci.java file it was supplied by the Professor and cant be changed.
Write a class which that you will call Fibonacci class with a method fib(N)
taylor Lynch wrote:Ok i changed the index to 40 and it ran the program. Then i took the variable sum and changed it to sum=in1+in2 and when i put the number 5 in it came back with 2. So something is still wrong. When it's correct it should come back with 8 because 5+3=8.
taylor Lynch wrote:The Fibonacci code that i've been using is copied and pasted directly from the site nothing has been changed except the things i changed in my previous post.
taylor Lynch wrote:I realize taht now. I changed the code in my previous post but as i said im still having a problem with the output being wrong.
Ok i changed the index to 40 and it ran the program.