0
whats the formula when it comes to exponent? for example: enter base number: 5 enter exponent number: 3 Power value: 125
Exponent Formula
3 odpowiedzi
+ 1
//without cmath
float a, //now it works for decimal point
int b;
cout << "Enter base";
cin >> a;
cout << "enter power ";
cin >> b;
for(b;b>1;b--){
a=a*a;
}
cout << a <<endl;