Untitled

Anonymous
c_cpp
02/12/2024 1:48 PM
276 B
17
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);
}
Editor is loading...
Leave a Comment