Electrical and Computer Engineering
6
of 24
UAH
CPE 112
Revisiting the Power Function
•
#include <iostream>
•
#include <cmath>
•
using namespace std
;
•
•
float
power (
int
base,
int
exponent);
•
•
int
main()
•
{
•
float
result;
•
int
base;
•
int
exponent;
•
•
cout << "Please enter integer base value " << endl;
•
cin >> base;