Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Power of an element
#include<iostream> using namespace std; int power(int a, int n){ if( n == 1) return a; else{ int y = power(a, n/2); return y*y; } } int main() { int a, n; cin >> a >> n; cout << power(a, n); return 0; }
run
|
edit
|
history
|
help
0
DailyExchRate
Set of intervals.
ABC.cpp
segmentedSieveD
HeapSort
Ss
Working variables benchmark
CPP - ex 5 - solution
replace_copy_if-30-Seconds-of-C++
Sorting Array