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 are some reasons why Immigrats people come to the U.S.?
if f(x)=|3x-4|+2, find f (-10)
which expression is equivalent to x^4-y^4?
how do i round 3,176 to the nearest thousand
Tear is to sorrow as smile is to
Jonathan has been on a diet since January 2013. So far, he has been losing weight at a steady rate. Bases on monthly weigh-ins, his weight, w, can be modeled by
How can b^2+9b+14 be re-written?1) (b+7) (b-7)2) (b-7) (b-2)3) (b+7) (b-2)4) (b+7) (b+2)
What is the value of x in 15x-10= 20
What challenges did the californios face?
I need a Amazon tribe name please! Need for Monday