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

Who know how to read political cartoon in history? I need two people to answer this ! Free Brainliest and point ! The effects of the cartoon above is most assoc
What are the key components of the Civil Rights Act of 1964? Choose three correct answers. - ended discrimination in housing based on color - ended discrimina
Which version of the sentence uses punctuation correctly?
Cuál es frase que significas ‘the man looks old’ el hombre es viejo El hombre está viejo
From which group did Andrew Jackson receive the most support in the election of 1828?
Please:( help me :((
Please hurry I’m timed geometry
blank is 40% of 60???​
George wants to buy a bike that costs 200 dollars. He decides to do odd jobs to earn the money for the bike. In June, George mowed 10 lawns, washed 8 cars, and
You earn $320 in 40 hours. At this rate how many hours do you work to earn $440?