anonymous
  • anonymous
Can someone help me with this?
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
anonymous
  • anonymous
@Hero ?
anonymous
  • anonymous
@.Sam.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
i kinda started it.. public class Fibonacci { public static void main (String [] args) { for (int i=1; i <=13; i++) { System.out.print( but got stuck here!
anonymous
  • anonymous
@radar
Hero
  • Hero
`public class Fibonacci { public static int fib(int n) { if (n < 2) { return n; } else { return fib(n-1)+fib(n-2); } } test main } `
anonymous
  • anonymous
//code for find the first 15 fib no in java class Fib { public static void main(String []arg) { System.out.println("First Fibonacci nos are:"); int c=1, n1=0, n2=1, temp; while(c != 16) { System.out.println(c+"th Fib no is :"+n2); temp=n2; n2=n2+n1; n1=temp; c++; } } }
anonymous
  • anonymous
This program prints out the first 15numbers in the Fibonacci sequence. Each term is formed by adding together the previous two terms in the sequence, starting with the terms 1 and 1. public class Fibonacci { public static void main(String[] args) { int n0 = 1, n1 = 1, n2; // Initialize variables System.out.print(n0 + " " + // Print first and second terms n1 + " "); // of the series for (int i = 0; i < 15; i++) { // Loop for the next 18 terms n2 = n1 + n0; // Next term is sum of previous two System.out.print(n2 + " "); // Print it out n0 = n1; // First previous becomes 2nd previous n1 = n2; // And current number becomes previous } System.out.println(); // Terminate the line } }
anonymous
  • anonymous
code is not needed... you can just use the reccurence relation f(n)={ 0, n=1 1, n=2 f(n-1)+f(n-2), n>2 }
anonymous
  • anonymous
thank you all.. :)
anonymous
  • anonymous
you are welcomed!

Looking for something else?

Not the answer you are looking for? Search for more explanations.