JoeM3388 JoeM3388
  • 03-04-2015
  • Computers and Technology
contestada

Give a recursive algorithm for finding the sum of the
first n odd positive integers.

Respuesta :

Hippalectryon
Hippalectryon Hippalectryon
  • 03-04-2015
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
Answer Link

Otras preguntas

evaluate the expression 2b^3+5 (BTW I did the first part it's 3 but I need the second part)​
Does x/x+11 simplify to 1/11? Why or why not ?
Equations, graphs, Slopes and y-intercepts : application
B. f. skinner believed one’s personality could be influenced by observing another’s social and classical conditioning. please select the best answer from the ch
Pay the first monthly installment of $2,011 related to the $104,000 long-term note payable borrowed in january 1. Round your interest calculation to the nearest
What is the area of this figure?
Please answer asap! how do scientists use P and S waves to infer the layers of the inner Earth.
I need help with this question?
PLS HELP WILL MARK YOU BRAINLIEST! NO FAKE ANSWERS! A local grocery store released the following statistics on the average volume of products sold per month in
In a class of 36 students, 29 do mathematics and 20 do chemistry. If 5 students do neither, how many students do chemistry but not mathematics?​