running fabonacci in c programming.. someone please help me...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 1992amar
    New Member
    • Jun 2013
    • 1

    running fabonacci in c programming.. someone please help me...

    i need to implement the fibonacci number sequence

    here is an example output of the program:

    Server:Waiting for connection
    Server:Receive connection from client
    Client:10
    Server:Print 10 Fibonacci
    Server:1 1 2 3 5 8 13 21 34 54
    Client:1 1 2 3 5 8 13 21 34 54

    if Client send value of 5, the output would be 1 1 2 3 5
    Last edited by zmbd; Jun 19 '13, 04:02 PM. Reason: [Z{No Edit: Nepomuk is correct. Please follow thru on Nepomuk's request}]
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    Hi 1992amar and welcome to bytes.com!

    OK, that sounds like an interesting task. We won't solve the problem for you (especially as it sounds like homework and our posting guidelines have strict rules against those questions) but we'll be happy to help you solve it yourself. So, what have you done so far? What ideas have you had? How would the program have to be split up?

    Comment

    • whodgson
      Contributor
      • Jan 2007
      • 542

      #3
      You probably have noticed that after the first two digits each succeeding number is the sum of the previous two in the series.
      Also that the client number could be used in a loop condition
      to stop it entering further sums (n) + (n-1) into an array.

      Comment

      Working...