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
NeX [460]
4 years ago
8

Write the definition of a method powerto, which receives two parameters. the first is a double and the second is an int. the met

hod returns a double. if the second parameter is negative, the method returns zero. otherwise it returns the value of the first parameter raised to the power of the second parameter.
Computers and Technology
1 answer:
mihalych1998 [28]4 years ago
5 0
       
The case of x⁰=1 is one you shouldn't overlook!

double powerto(double f, int exponent)
{
            if (exponent < 0) { return 0; }
            if (exponent == 0) { return 1.0; }          
            while (--exponent > 0) { f *= f; }
            return f;
}
You might be interested in
What are two reasons for entering the ping 127.0.0.1 command on a windows pc?
Hunter-Best [27]

127.0.0.1 is the loopback Internet Protocol (IP), the address is used to establish an IP connection to the same computer being used by the end-user.

The some reason that a person will command a ping 127.0.0.1 in a command prompt is because they will check if the NIC and drivers implementation is functional and it used in testing the TCP/IP.

4 0
4 years ago
Read 2 more answers
1. Controlling Redundancy 2. Restricting Unauthorized Access 3. Providing Persistent Storage for Program Objects 4. Providing St
Dominik [7]

Answer:

Are all jobs of a DBMS (Database Management System).

Explanation:

DBMS or Database Management System is a software tool that is used to manage databases. Popular examples include MS SQL Server, Oracle and MySql. DBMSs can range from command line tools to fully featured programs.

DBMS's main job is to provide a interface for managing database, and also provide efficient and quick results of queries.

DBMSs also provide ways to connect your application to the database through APIs, so that a programmer can provide persistence to the application data.

4 0
4 years ago
Which of the following represents data selected from interviews, surveys, and other communications initiated by the researcher?
Flura [38]
The answer would be digital data
7 0
4 years ago
To protect the computer network of a large organization, network engineers monitor network traffic. This traffic is compared to
ioda

Answer:

To protect the computer network of a large organization, network engineers monitor network traffic. Malware detection method of data mining best being used to protect the network.

Explanation:

Data mining has excellent potential as a malware detection tool. It allows us to analyze vast sets of information and gives an opportunity to extract new data from it. It also provides the ability to identify both known and zero-day attacks.

5 0
3 years ago
Read 2 more answers
Write a program that prints the question " Do youwant to continue? " and reads a user input. if the userinput is " Y ", " OK", o
Nataly_w [17]

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

   string in;//string in for taking input...

   cout<<"Do you want to continue ?"<<endl;

   getline(cin,in);//taking input from the user...

   if(in=="y"||in=="Y"||in=="yes"||in=="OK"||in=="Why not?")//conditions..

   cout<<"OK"<<endl;

   else if(in=="No")

   cout<<"terminating"<<endl;

   else

   cout<<"Bad input"<<endl;

return 0;

}

Explanation:

I have taken a string in.

Then taking input from user.

Checking the conditions using if else if ladder.

7 0
3 years ago
Other questions:
  • When installing a device driver, start the computer in
    14·1 answer
  • To create bold shadows, which lighting choice would work best.
    7·1 answer
  • Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
    13·2 answers
  • Why do so many technical jobs require weekend and evening work
    9·1 answer
  • 1. Landscapes are the one type of photograph in which you should always use the traditional perspective.
    15·2 answers
  • What is a set of illustrations displayed in a specific sequence to pre-visualize what your mobile app looks like and how it work
    5·1 answer
  • A malicious user in your organization was able to use the Trinity Rescue Kit to change the password on a department manager's co
    7·1 answer
  • Choose the best function for the purpose.
    11·1 answer
  • HURRY HELP THIS IS FOR CODING !!!! What are some real-life situations that require a program that is iterative? Include at least
    6·2 answers
  • Who benefits the most from billing by the second for cloud resources, such as virtual machines?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!