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

Name three features on earth surface that can be formed by plate tectonics activity.
What is the importance of stem cells within human bodies? Choose all that apply. Plants are the only type of organisms that contain stem cells—located in the st
What is the 1/2 of 3/4?
For every $12 he earns babysitting , he saves $5 , on saturday , rob earned $48 babysitting how much money did he save
help !!! ..............
A ________ changes your home page and redirects you to other websites.
What is the main result of extreme weight loss? A. Anorexia nervosa B. The binge/purge cycle C. Bulimia
the intolerable acts occured during?
How can graphics and/or statistics be used to misrepresent data? where have you seen this done?
An artist receives 20% royalty on the retail price of his recordings. if he receives $36,000 in royalties, what is the dollar amount of the retail price of his