Untitled
#include <iostream> using namespace std; int step(int a, int b) { int c = a; while (b>1) { a *= c; b--; } return a; } int main() { int a, b; cin >> a >> b; cout << step(a, b); }
Leave a Comment
#include <iostream> using namespace std; int step(int a, int b) { int c = a; while (b>1) { a *= c; b--; } return a; } int main() { int a, b; cin >> a >> b; cout << step(a, b); }