Untitled
unknown
c_cpp
2 years ago
206 B
7
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