Untitled

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