Untitled
#include <iostream> #include <math.h> #include <string.h> using namespace std; long long stepen(int a,int b) { long long stpn = 1; while (b > 0) { stpn *= a; b--; } return stpn; } int main() { int a, b; cin >> a >> b; cout << stepen(a, b); return 0; }
Leave a Comment