Question: Write a c++ program that outputs the sequence 1 3 4 7 11 18 29 47 76 123 We start with a 1 and 3
Write a c++ program that outputs the sequence 1 3 4 7 11 18 29 47 76 123
We start with a 1 and 3 and generate each subsequent number by adding the previous two. Your program should initialize two variables that equal 1 and 3 respectively, then use a loop to generate the rest of the numbers according to the adding rule above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
