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..![]()
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..![]()
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.![]()
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!
dali ra kaayo na ang fibonacci.........try mister google..
Ayaw pag search oi... i solve na sa imo kaugalingon, saon nimo pag kat-on cgi lang ka search.
Hehehehe...
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.
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.
Aw cge, chori.
Last edited by junkfactory; 06-19-2009 at 03:25 PM. Reason: Di daw hatagan ug code.
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...
unsa man ni fibonacci code? kadungog man ko ani sa prison break.ask lang ko ha?
Similar Threads |
|