write a function to calculate the n power m using loop
int power(int n, int m) { int res = 1; for(int i=0; i<m; i++) { res *= n; } return res; }
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment