Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

math456 Group Title

Can someone help me with this?

  • 2 years ago
  • 2 years ago

  • This Question is Closed
  1. math456 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    • 2 years ago
  2. math456 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @Hero ?

    • 2 years ago
  3. math456 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @.Sam.

    • 2 years ago
  4. math456 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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!

    • 2 years ago
  5. math456 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @radar

    • 2 years ago
  6. Hero Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    `public class Fibonacci { public static int fib(int n) { if (n < 2) { return n; } else { return fib(n-1)+fib(n-2); } } test main } `

    • 2 years ago
  7. thishanth Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    //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++; } } }

    • 2 years ago
  8. curiousshubham Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    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 } }

    • 2 years ago
  9. infinity_ Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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 }

    • 2 years ago
  10. math456 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    thank you all.. :)

    • 2 years ago
  11. curiousshubham Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    you are welcomed!

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.