Okay does ne1 know how to do fibbonaci series in C++ can anyone explain me the logics behind them need desperate help !!!!
so i gotta print the series A AB ABC ......
You will need to learn about using recursion functions, ie a function that is calling himself. It will be something like this. recursion method unsigned long fibonacci(unsigned long number) { if ((number==0)||(number==1)) return number; else return fibonacci(number-1)+fibonacci(number-2); //recursion step } You'll get all the available help and explanations in the ("C++ How to program", Sixth edition) ebook from page 294 to 301.
You will also have to learn how to concantenate and copy strings. strcpy(a,b) //Copy String strcat(a,b) //Concatenate String C+ How to program (Pg 454 to 458)
Join our real-time social learning platform and learn together with your friends!