Untitled

Anonymous
c_cpp
02/17/2024 9:49 AM
364 B
19
Indexable
#include <iostream>
using namespace std;

int step(int a, int b) {
    int i = 0;
    int count = 1;
    while (i < b) {
        count *= a;
        i++;
    }
    return count;
}

int main()
{
    int a, b;
    cin >> a >> b;
    cout << step(a, b);
}
Editor is loading...
Leave a Comment