text: Write a program to calculate pow ( x , n ) | C ++ program for the above approach ; return type of pow ( ) function is double ; Driver Code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; int power ( int x , int y ) { return ( int ) pow ( x , y ) ; } int main ( ) { int x = 2 ; int y = 3 ; cout << ( power ( x , y ) ) ; }