Results 1 to 7 of 7

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

- 08-01-2011, 03:17 PM #1Member
- Join Date
- Aug 2011
- Posts
- 8

- Rep Power
- 0

## 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.

- 08-01-2011, 03:25 PM #2idnk what to do

- 08-01-2011, 03:26 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7

- Rep Power
- 28

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,

JosBuild a wall around Donald Trump; I'll pay for it.

- 08-01-2011, 03:36 PM #4Member
- Join Date
- Aug 2011
- Posts
- 8

- Rep Power
- 0

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?

- 08-01-2011, 03:38 PM #5
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.

- 08-01-2011, 03:40 PM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7

- Rep Power
- 28

- 08-02-2011, 12:53 AM #7

## Bookmarks