Find power of a number
Find power of a number
Send Feedback
Find power of a number
Two integers x and n (separated by space)
x^n (i.e. x raise to the power n)
0 <= x <= 8
0 <= n <= 9
3 4
81
2 5
32
#include<iostream>#include<cmath>using namespace std;
int main() { // Write your code here int result,exponent,base; cin>>base>>exponent; result=pow(base,exponent); cout<<result;}
Comments
Post a Comment