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

Suppose that the average speed (vrms) of carbon dioxide molecules (molar mass 44.0 g/mol) in a flame is found to be 2.67 105 m/s. What temperature does this rep
Rank these temperatures from hottest to coldest: 32° F,32° C, and 32 K 320 F> 32° C>32 K 32°C 32° F 32 K 32° F 32 K 32° c 32° F 32° c 32 K 32° C 32° F 32
Calculate the magnitude of the gravitational force exerted on a 4.20 kg baby by a 100 kg father 0.200 m away at birth (he is assisting, so he is close to the ch
Rob is a machinist. He has just started taking a muscle relaxant to help with strain injury. While taking this drug, Rob should consider all of the following: A
Solve for x. x2 − 2x = 0
Help ASAP please please assss soooon as you see this
Find the word that does not belong and write a sentence about how the others are alike. 3,4,5 please
I dentify the domain and range and sketch the graph [tex] y = sqrt { - x - 3 - 3} [/tex] ​
sollve for x (x-5)=4x-5
Identify a disease state that could be treated with gene therapy.