pow() Function Return Value

  • The power function returns the floating point value of x raised to the power y ( x y ).

Power Function in C/C++

Given two numbers base and exponent, the C++ or C pow() function finds x raised to the power of y i.e. x y. Basically in C/C++, the exponent value is calculated using the pow() function. The pow() function is used to calculate the power of a number in C/C++. It takes double as input and returns double as output.

We have to use #include <math.h> in C/C++  to use that pow() function in our C/C++ program.

Similar Reads

Syntax of pow() Function

double pow (double x, double y);...

pow() Function Parameters

This method takes only two arguments:...

pow() Function Return Value

The power function returns the floating point value of x raised to the power y ( x y )....

Example of pow() Function

Input: 2.0, 5.0 Output: 32.00 Explanation: pow(2.0, 5.0) executes 2.0 raised to the power 5.0, which equals 32 Input: 5.0, 2.0 Output: 25.00 Explanation: pow(5.0, 2.0) executes 5.0 raised to the power 2.0, which equals 25...

Working of pow() Function with Integers

...