0

whats the formula when it comes to exponent? for example: enter base number: 5 enter exponent number: 3 Power value: 125

Exponent Formula

15th Jul 2017, 3:57 PM
Jecille Villanueva
Jecille Villanueva - avatar
3 Respuestas
+ 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;
15th Jul 2017, 7:09 PM
‎ ‏‏‎Anonymous Guy