bewellplus.gsu.edu
JoeM3388 JoeM3388
  • 03-04-2015
  • Computers and Technology
Answered

Give a recursive algorithm for finding the sum of the

first n odd positive integers.

Verified Answer :

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

Related Questions

In which of the following scenarios would the Board of Governors be most likely to intervene 5 points Economic data for the year are released and require analys
If a ball starts with the velocity of 20ms and accelerates with a constant rate of 050ms squared for 25s what is the balls final velocity
How did Roosevelts policies help the conservation of natural resources
The smallest group that includes gibbons and humans but ford not include tarsiers is A primates B anthropoids C hominoids D hominines
An individual with strong financial literacy skills can a live without a designated occupation b avoid spending money on necessities c create and keep to a real
Slope2 Passing through 23
Alcohol is a key factor in more than half of all manslaughters assaults and murders A True B False
how many judges does a full federal court have in Australia
Eugene wants to buy jeans at a store that is giving 10 off everything The tag on the jeans is marked 50 off The original price is 4998 Find the total cost if th
At the library the average ratio of a hardbound books to paperback books on a shelf is 53 How many paperback books does 75 have