Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By kissmeeq

Thread: Pls help me idnk what to do :((

  1. #1
    kissmeeq is offline Member
    Join Date
    Aug 2011
    Posts
    8
    Rep Power
    0

    Default Pls help me idnk what to do :((

    Problem 2: (Fibonacci.java)
    Given two numbers f1 and f2, the Fibonacci series defined on f1 and f2 is a sequence of terms s1, s2, s3, s4, s5, and so on such that s1 = f1, s2 = f2, and sn = sn1 + sn2 for all n > 2 (i.e., the 1st term is equal to f1, the 2nd term is equal to f2, and from the third term onwards, the value of a term is equal to the sum of the two immediately preceding terms; e.g., the value of the 3rd term will be the sum of the 1st and 2nd terms, the value of the 4th term will be the sum of the 2nd and the 3rd terms, the value of the 5th term will be the sum of the 3rd and the 4th terms, and so on).
    For example, assuming that f1 = 0 and f2 = 1, the first 10 terms of the Fibonacci series will then be:
    0, 1, 1, 2, 3, 5, 8, 13, 21, 34
    Write a program that accepts as input values for f1 and f2, as well as a positive integer n. The program then prints out the first n terms of the Fibonacci series defined on f1 and f2, as well as the sum and the average of the said terms.
    Lloydaaa likes this.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,891
    Rep Power
    25

    Default

    idnk what to do
    I think you are supposed to write a java program.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,773
    Blog Entries
    7
    Rep Power
    21

    Default

    Please don't dump all your homework here; at least show some effort so you can make us believe that you at least tried. And please try to write proper English; English is not my native language.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    kissmeeq is offline Member
    Join Date
    Aug 2011
    Posts
    8
    Rep Power
    0

    Default

    uhm sir sory uhm i have written my program in my first thread and i think its the same but i cant figure it out something like that im sorry but please can u help me?

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,891
    Rep Power
    25

    Default

    Post the code you have written for this assignment and add your questions about the problems you are having.
    Be sure to put the code in code tags. Use the #icon above the input box.

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,773
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by kissmeeq View Post
    uhm sir sory uhm i have written my program in my first thread
    No you haven't; you have written an (incorrect) attempt to approximate pi but that hasn't much to do with Fibonacci numbers (well, actually it has but that is beyond the scope of your question).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •