Ask Question
5 December, 15:14

Give a recursive algorithm for finding the sum of the

first n odd positive integers.

+4
Answers (1)
  1. 5 December, 17:41
    0
    I'm writing that in some sort of pseudocode; if you don't understand it, feel free to ask for more details in the comments.

    function sumOdd (n)

    if n==1 then

    return 1

    end if

    return (sumOdd (n-1)) + (n*2-1)

    end function
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Give a recursive algorithm for finding the sum of the first n odd positive integers. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers