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

what is an ecosystem found in warm, clear salt water?
I need assistance please!
Stuttering occurs when the flow of speech is abnormal or interrupted repeatedly. how frequent is this disorder in the general population?
How would you characterize jill wilfert's personal leadership?
what is the percentage of radioactive nuclei left after 3 half lives pass?
Imagina que vives en un país sin libertades y sin derechos humanos; escribe una oración completa en español explicando lo que harás para mejorar tu situación y
Which of the following are common characteristics of a Shakespearean comedy
Destruction of forests can result in reduced rainfall and a drier climate in the deforested region. This is due to _____. forest growth severe soil erosion exce
Please help me solve this.
The running back for the Bulldogs football team carried the ball 3 times for a total loss of 6 3/4 yards. Find the average change in field position on each r