1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
geniusboy [140]
3 years ago
8

Give a recursive algorithm for finding the sum of the first n odd positive integers.

Computers and Technology
1 answer:
Andrei [34K]3 years ago
3 0
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
You might be interested in
What is true about client-side scripting?
Alexeev081 [22]

Answer:

A client-side script is a program that is processed within the client browser. These kinds of scripts are small programs which are downloaded , compiled and run by the browser. JavaScript is an important client-side scripting language and widely used in dynamic websites.

Explanation:

3 0
3 years ago
What would you NOT use a router for?
Lena [83]
To run applications on your computer

-Apps will run independently from a router.
8 0
3 years ago
How to instal and complie java in windows?
Paladinen [302]
Go to www.oracle.com , the Downloads tab, find Java, probably SE (Standard Edition) and then select the appropriate SDK (Software Development Kit).

I don't remember if you need to use an absolute (full) path to javac on Windows, but the command is something like:

javac yourProgram

yourProgram needs to be named yourProgram.java
4 0
3 years ago
Anne wants to hide her age by converting it from 13 to 1101. Which number system is Anne converting to?
Misha Larkins [42]

Answer:

The correct answer is: Option A: Binary

Explanation:

Annie is converting her age from 13 to 1101.

The binary number system is a two-digit number system that only consists of zeroes and ones.

We can see that the number system Anne is converting to, only consists of two combination of two digits 0 and 1.

Moreover, we can convert 13 to binary to see

2   13

2    6 - 1

2    3 - 0

      1 - 1

Hence,

The correct answer is: Option A: Binary

7 0
3 years ago
In the context of programming languages, typically assembly/machine languages lack ____________ in that each operation does some
Marta_Voda [28]

Answer:

"expressibility" is the correct answer for the above question.

Explanation:

  • Expressibility is a term that is used in a programming language to express the idea of logic. It is in the form of a statement. The statement in the assembly or machine level language is written in more lines. But the same statement is written in one line in a high-level language.
  • The above question asked about the term which is more in assembly language and less in a high-level language. That term is expressibility or statement.
5 0
3 years ago
Other questions:
  • When setting permissions on an object to Full Control, what otherpermissions does this encompass?Read, Write, Execute, and Modif
    13·1 answer
  • If your computer won't connect to the internet, which of these is most likely to be the problem?
    8·1 answer
  • Do you get notified if someone follows you on Spotify like your email or do you just have to find out on your own
    14·1 answer
  • When your purchases are swiped over the bar-code reader at the point-of-sale terminals at Wal-Mart, a _____ records the data.
    8·1 answer
  • Write the correct word to complete the sentence:
    7·1 answer
  • Desirable workplace habits and skills include:
    14·1 answer
  • Write convert() method to cast double to int
    7·1 answer
  • What is Error Code: 232011
    11·2 answers
  • Write a recursive method that takes four inputs: a 1-D array of Strings (i.e., exams), the length of this 1-D array (i.e., n), a
    8·1 answer
  • The formula for calculating the amount of interest charged on a loan is:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!