Recent content by cgrumiea
-
C
Comp Sci Find the previous Fibonacci number: java
Forgive me if I sound like a total idiot here. I'm just genuinely lost. I guess one way would be to start from scratch and add everything up until you get there, then look back one. That just seems like the most concrete way to me, since I can't seem to come up with a formula or anything.- cgrumiea
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
C
Comp Sci Find the previous Fibonacci number: java
Homework Statement The first several numbers in the "Fibonacci Sequence" are 0, 1, 1, 2, 3, 5, 8, 13, 21, ... Each number is formed by summing the two previous numbers. Define a method named prevFib that takes a non-zero Fibonacci number and returns the Fibonacci number that comes immediately...- cgrumiea
- Thread
- Java
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
C
Comp Sci Creating pow in Java: Learn Recursive Solution
Homework Statement Define a recursive method named pow that takes two integers, x and n, and returns the result of raising x to the n-th power. Assume that n is non-negative. pow(5, 0) ==> 1 pow(2, 10) ==> 1024 pow(-3, 2) ==> 9 Homework Equations The Attempt at a Solution...- cgrumiea
- Thread
- Java
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
C
Derivative: arctan(sqrt((1-x)/(1+x)))
Homework Statement Find the derivative: arctan\sqrt{(1-x)/(1+x)} Homework Equations Chain Rule, Quotient Rule The Attempt at a Solution I've gotten to a point where I feel like I either don't know how to simplify from this point, or I've done something wrong...- cgrumiea
- Thread
- Derivative
- Replies: 1
- Forum: Calculus and Beyond Homework Help