Modify the code segment below so that it aso outputs theposition of the Fibonacc
ID: 3613090 • Letter: M
Question
Modify the code segment below so that it aso outputs theposition of the Fibonacci number in the sequence. For eg. 1 1 2 1 3 2 4 3 5 5 6 8 7 17 first = 1; second = 1; cout << first << endl<< second << endl; while (second < 30000) { next= first + second; first= second; second =next; cout<< second << endl; } Modify the code segment below so that it aso outputs theposition of the Fibonacci number in the sequence. For eg. 1 1 2 1 3 2 4 3 5 5 6 8 7 17 first = 1; second = 1; cout << first << endl<< second << endl; while (second < 30000) { next= first + second; first= second; second =next; cout<< second << endl; }Explanation / Answer
please rate - thanks count=1; first = 1; second = 1; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.