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
3. In which of the following places can
maw [93]

Answer:

On the World Wide Web

Explanation:

Sure theres always a homepage somewhere. But i dont know what your researching so i went with c.

8 0
3 years ago
Read 2 more answers
When you run __________ on your hard drive, files are reorganized, making the hard drive work more efficiently.
andre [41]

Answer:

Disk Defragmenter

Explanation:

6 0
2 years ago
Explain why database management systems are used in hospitals? Discuss
Sergeeva-Olga [200]

The reason why database management systems are used in hospitals is because the use of Healthcare databases aids in terms of diagnosis and treatment, handle documentation and billing, and others.

<h3>What is a database management system in healthcare?</h3>

A database management system (DBMS) is known to be a type of software that has been developed to help people to form and keep databases.

It is one that helps to lower the risk of errors associated with medical operations and management. It reduces  paperwork and staff and also improves  performance.

Learn more about database management from

brainly.com/question/24027204

8 0
2 years ago
can I do all my work in a notebook with Penn foster or do I have to type all of the answers in that little box?
dusya [7]
Um whichever is better for you! ummm whats the point of this question?
5 0
3 years ago
Read 2 more answers
Which network type uses a coaxial cable to receive its signal?.
Tresset [83]
If you’re asking what I think your saying I know comcast does
6 0
2 years ago
Other questions:
  • 24 bit or 16 million colors is often called?
    7·1 answer
  • 2. What is “suspension of disbelief?” Which form of immersion is it most closely associated with?
    9·2 answers
  • The data in a data warehouse have which of the following characteristics?
    13·1 answer
  • The United States is the only country in the world in which organs and tissue transplants are performed. True or False?
    8·1 answer
  • If you want to present slides to fellow students or coworkers which productivity software should you use to create them A. Word
    14·2 answers
  • What can hack or code can I use to get a shadow or frost dragon in adopt me
    6·2 answers
  • As a student, how can you sustain focus and attention with technology distracting you from things that matter (academic, persona
    7·1 answer
  • Paul wants to store addresses and phone numbers for clients. Paul wants to use this information to send form letters. Paul shoul
    5·1 answer
  • 1. What is hydrolics?​
    6·1 answer
  • A new president has been elected. She promises to lower taxes drastically. What is most LIKELY to happen as a result of this dec
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!