Posted by Compstudent on Wednesday, March 30, 2011 at 10:10pm.
if k=>n, there is only one operation, the test.
If k<n, then each time the test occurs, there are four operations(test, replace, replace, replace), and one final operation the test.
4n+1 is correct.
Step 1 Set a=1, b=1, c=2,and k=0
Step 2 while k < n
(a) Replace c with a+b
(b) Replace a with b
(c) Replace k with k+1
endwhile
Step 3 Print b
Related Questions
Elementary Mathematics - How can a teacher help a student develop a strong ...
polynomials - What is the basic principle that can be used to simplify a ...
Discrete Math - Pattern Matching 6. Build the Boyer-Moore last table for the ...
Elementary Mathematics - Thanks for your response Ms Sue.... but what does the ...
Elementary Math - The temperature of a cup of coffee is a discrete or continuous...
AED - Post your response to the following: The introduction of calculators and ...
intro programming - (algorithm workbench) Write assignment statements that ...
Math - Use multiplication, division, addition and subtraction and at least one ...
Discrete Math - Geometric Vectors - I'm lost! How do you add the following ...
discrete mathematics with applications - A logical equivalance is derived from ...
For Further Reading