/* Fibonacci <5000< */ #include using namespace std; int main(int argc, char *argv[]) { int n, i, protel=0, tel=1, epom; //f(i-1), f(i), f(i+1) fib arithmoi i=2; // deikths arithmou Fib sthn akolouthia while (epom < 5000) { protel = tel; tel = epom; epom = protel + tel; i++; } cout << "O megalyteros Fib mikroteros apo 5000 einai o " << tel << endl; cout << "O mikroteros Fib megalyteros apo 5000 einai o " << epom << endl; system("Pause"); return 0; }