Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
compute power to a number manually, and by using function.
#include <iostream> using namespace std; int power(float base, int exp) { float result = 1; for(int i = 0; i < exp; i++) { result = result * base; } return result; } int main() { float base; int exp; cin>>base>>exp; float result = power(base,exp); cout<<result; }
run
|
edit
|
history
|
help
0
GoF interpreter
Web Browser History - DLL
Vectores - insertar ordenado e imprimir
FindMissingLagrange
p30
Policy based smart pointer
Synchro#1
BridgeEdge
XD
EqualIdentical