Correct my lab c++

timer Asked: Apr 17th, 2017

Question description

hello i have lab c++ program i need to get it correct and this the wrong questions :

Lesson 18-2



/* 2/4 points */

/* You did not record your output. */



/* 0/4 points */

/* Your program does not calculate the fibonacci numbers. Your program

does not work because it contains an error that causes the recursion to

go past 0 and then recurse inifinitely after it. If you would like a

more thorough explanation you can ask me or Dr. Lee about this. In

addition, this and the next exercise are about fibonacci numbers, not

factorials. */



/* 2/4 points */

/* You did not record your output. */


Lesson 18-3



/* 2/4 points */

/* While your program does recursively print out the elements in an

array with limit values, your porgram does not fulfill all the necessary

requirements. Your program was supposed to obtain the values for the

array from the file "recursive". You program initializes all the values

of the array, instead of filling in only the exact amount needed. In

addition, you had the user set the limit, instead of setting the limit

based on how many values were read in from the file. */



/* 0/4 points */

/* Code does not compile. */



/* 0/4 points */

/* Code does not compile. */


The recursion is well-used. With recursion, we get to the last element

before starting printing the elements. We dont need to use another data

structure to complete this task.

If we dont use recursion, we would need to store the elements of the

list into a stack, and then print the elements of the stack.

/* 2/4 points */

/* You did not answer both parts of the question. You were supposed to

say whether both situations were good uses of recursion. You only

touched on the use of recursion in the first situation. */

/* Ex 5 0/4 points */

/* No code or answer detected for this exercise. */

/* Ex 6 0/4 points */

/* No code or answer detected for this exercise. */

Tutor Answer

(Top Tutor) Studypool Tutor
School: Rice University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors