Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

pow() function in C++ | What is pow() Function?

What is pow() Function?

      The pow() function is used to calculate the exponential power of a given number. The declaration of pow() function is as follows:
double pow (double, double);
      The declaration of pow() function indicates that two parameters both of "double" types are passed to this function. The output returned by this function is also of "double" type.
      The general syntax to call this function is as follows:
var = pow (x, y);
In the above syntax:

It indicates a value whose exponential power is to be calculated. It may be a variable, constant value or expression.

y

It indicates a value to be used as exponential power.

var

It indicates the variable of "double" type into which the returned vale is to be stored.
The following statement will calculate 2^3 and display the result on the screen.
cout



This post first appeared on Programming Explain, please read the originial post: here

Share the post

pow() function in C++ | What is pow() Function?

×

Subscribe to Programming Explain

Get updates delivered right to your inbox!

Thank you for your subscription

×