Untitled

mail@pastecode.io avatar
unknown
c_cpp
10 months ago
206 B
3
Indexable
#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