Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  1. #1

    Default fibonacci code in c language


    gud pm guys..unsa na fibonacci?..am pwde ko ask nnyo og code ana? in turbo c?
    thanks..
    unsaon na siya?..mag input ka og number?..then what comes next?.tenks again..

  2. #2
    mag input bro? unsa man diay ang instructions? kaybaw ko ani sa c# but not in c....ipadisplay lang siguro kay usa ra man gyud an sequence ana...1,1,2,3,5,8,13.... sayun ra kaayo na bro...sugdi lang code dayun ask dri...ayaw pud tanan ang ipahimo oi, dapat u try to do it urself first before ka mo ask ug help....

    just my opinion

    click me in case u want to research more about it.

  3. #3
    i-google na sa wikipedia, unya basaha ug tarong..
    naka-create gud ka ug topic dire sa istorya, makagoogle ra ka ana ra pud.. simple ra kaau ang explanation sa wikipedia.. unless di ka kasabot ug english..

    peace bro!

  4. #4
    dali ra kaayo na ang fibonacci.........try mister google..

  5. #5
    Ayaw pag search oi... i solve na sa imo kaugalingon, saon nimo pag kat-on cgi lang ka search.

    Hehehehe...

  6. #6
    Here's my Fibonacci solution using recursion. Take note the input number must not exceed max (int) ... Note: I have not compiled and tested this yet ... go get a compiler and run this, then post if there's something wrong with it.
    Code:
    #include <stdio.h>
    
    long fibo_nako(unsigned long n);
    
    int main()
    {
       
        int n;
        printf("Please enter a number for the fibonacci sequence. \n");
        scanf("%d", &n);
        fibo_nako(n);
       
    }
    
    long fibo_nako(unsigned long n)
    {
       
        if (n <= 1)
        {
            printf("%d ", n);
            return n;
        }
        else
        {
            return fibo_nako(n-1)+fibo_nako(n-2);
        }
       
    }
    Last edited by kolz; 06-19-2009 at 01:15 PM.

  7. #7
    oops ...

    it should be:
    Code:
    int fibo_nako(int n) 
    {
      if (n == 1 || n == 2)
        return 1;
      else
        return (fibo_nako(n-1) + fibo_nako(n-2));
    }
    Last edited by kolz; 06-19-2009 at 01:22 PM.

  8. #8
    Aw cge, chori.
    Last edited by junkfactory; 06-19-2009 at 03:25 PM. Reason: Di daw hatagan ug code.

  9. #9
    hehehe hatag man mo code saons.. let him discover kng unsaon para makasabot gyud.. hehe hatagan ninyo code wa pa gani kasabot unsa dagan sa fibonacci...

  10. #10
    unsa man ni fibonacci code? kadungog man ko ani sa prison break.ask lang ko ha?

  11.    Advertisement

Page 1 of 3 123 LastLast

Similar Threads

 
  1. MGA BRO: HELP ABOUT VIDEO RENTAL SYSTEM IN VB LANGUAGE
    By peewee711 in forum Programming
    Replies: 12
    Last Post: 09-14-2010, 03:51 AM
  2. VB.Net code in creating database...
    By janjerell in forum Programming
    Replies: 6
    Last Post: 07-08-2010, 08:57 PM
  3. Dota cheat codes in multi player
    By chriztophers in forum Software & Games (Old)
    Replies: 124
    Last Post: 01-03-2010, 11:37 AM
  4. Codes in creating ICM
    By Burn Out in forum Software & Games (Old)
    Replies: 3
    Last Post: 12-04-2009, 09:21 AM
  5. How to write code in vb6 to communicate with the printer?
    By leyarchitecture in forum Programming
    Replies: 5
    Last Post: 02-24-2009, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top