Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
432 B
0
Indexable
Never
#include <iostream>
using namespace std;

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

int krut(int a, int b, int c) {
    int d = sum(a, b);
    int k = step(d, c);
    return k;
}

int main()
{
    int a, b, c;
    cin >> a >> b >> c;
    cout << krut(a, b, c);
}
Leave a Comment