Hw4 Recursion Solution

$30.00 $24.00

Please do this in your pairs. Write a recursive function named product that takes two parameters m and n, both integers. The function should return the product of all the numbers between m and n inclusive. For example, the function call product(5, 3) should return 60, because 3 x 4 x 5 = 60. You…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Please do this in your pairs.

  1. Write a recursive function named product that takes two parameters m and n, both integers. The function should return the product of all the numbers between m and n inclusive. For example, the function call product(5, 3) should return 60, because 3 x 4 x 5 = 60. You may not make any assumptions about the values or order of the two parameters. If m and n are the same, return m (or n, since they are the same).

  1. Write a recursive function named findMaxInList that takes a linked list of ints and returns the largest int in that list. (Assume that it won’t be an empty list.)

  1. Write a recursive function named sumEvens that takes a linked list of ints and returns the sum of only the even numbers in the list.

Hw4 Recursion Solution
$30.00 $24.00