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
V125BC [204]
3 years ago
13

Write an efficient C++ function that takes any integer value i and returns 2^i ,as a long value. Your function should not multip

ly 2 by itself i times; there are much faster ways of computing 2^i.
Computers and Technology
1 answer:
Ilya [14]3 years ago
4 0

Answer:

long power(int i)

{

   return pow(2,i);

}

Explanation:

The above written function is in C++.It does not uses loop.It's return type is long.It uses the function pow that is present in the math library of the c++.It takes two arguments return the result as first argument raised to the power of second.

for ex:-

pow(3,2);

It means 3^2 and it will return 9.

You might be interested in
What is fair use?
koban [17]

Answer:

I believe its C

Explanation:

I'm sorry if its wrong...

8 0
3 years ago
Read 2 more answers
IT professionals should help to protect users’ personal information, such as bank account information or Social Security numbers
sesenic [268]

To prevent theft of account information, identity theft, money, important passwords, and personal information.


Hope it helps ❤️

8 0
4 years ago
Read 2 more answers
12. What was the trade Howard offered to Death?​
Pachacha [2.7K]

Answer:

His life

Explanation:

5 0
3 years ago
What type of software is word processing software?<br><br> (I really need the answer )
sergejj [24]

Answer:

Application software

Explanation:

There are two types of software: application software and systems software. Systems software focuses on managing the computer itself, like file managing applications, DOS, etc. Application software is for the users of the device. Examples include a media broadcaster, like Netflix, a video game, email services, and of course, word processor.

If you're looking for examples of word processing software, these include Microsoft Word, Google Docs, Pages, etc.

6 0
3 years ago
Which tab should you click if you want to access the Show All Comments option in a worksheet?
Lostsunrise [7]

Answer: Review

Because you want to review the comments

3 0
3 years ago
Read 2 more answers
Other questions:
  • How can people make sure they are using credit cards responsibly
    14·2 answers
  • An athlete runs every day for five days. Write a program that computes the total distance and average distance ran by the athlet
    10·1 answer
  • In what year did alienware introduce alienfx lighting zones into their pc's?
    10·1 answer
  • Information in​ folders, messages,​ memos, proposals,​ emails, graphics, electronic slide​ presentations, and even videos create
    7·1 answer
  • You are going to do a bubble sort on the following list. What are the missing members of the list? Select 3 options.
    14·2 answers
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
  • Consider the following method, remDups, which is intended to remove duplicate consecutive elements from nums, an ArrayList of in
    7·1 answer
  • Why does Brainly not have a astronomy section. (I'd prefer brainly answer this)
    7·1 answer
  • Why is it useful to understand coding fundamentals even if you work in a game design role that doesn’t traditionally write code?
    9·1 answer
  • In what medium do web applications operate?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!