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
merge-sort
Sliding Game
AVL - ith element
stackLinkedlist
PriorQ2
ASHA
Matrix spiral print
Dar
SD
typename T class T