C++ Math pow()This function is used to find the power of a given number. Consider a base 'b' and exponent 'e'.Power=be SyntaxIts syntax would be : Note: If any argument is of long double type, then the return type is promoted to long double. If not, then the return type is promoted to double.Parameterb: 'b' is the number, whose power is to be calculated. e: 'e' is the exponent. Return valueIt returns the base 'b'raised to the power 'e'. Example 1Let's see a simple example when both base and exponent are of integer type. Output: Power of a given number is :16 Example 2Let's see a example when base is of float type and exponent is of integer type. Output: Power of a given number is :64 Example 3Let's see a simple example when both base and exponent are of float type.. Output: Power of a given number is :4 Next TopicC++ Math Functions |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India