Programming Homework Help. University of California Los Angeles C++ Programming and Data Structure Project
question 1 details and I am going to attach the coding part below.
Write a recursive function get Sum(int value, int distance) that provides the sum of all even values up to a certain distance from a starting value, but counting backwards. For example,
getSum( 12, 5 )
will consider the values 12, 11, 10, 9, and 8 (i.e. 5 values including the starting value), but the sum returned will only use the even values in that sequence, i.e. 12+10+8 = 30
Input and distance values provided are guaranteed to be larger or equal to zero.
Question 2 will be uploaded in the chat.