fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. auto pow = [] (int X, int k) {
  6. int result = 1;
  7. for(int i = 0; i < k; ++i) result *= X;
  8. return result;
  9. };
  10.  
  11. cout << pow(5,3);
  12. return 0;
  13. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
125