L10 - B

public
yeskendir.sultanov Mar 29, 2024 Never 106
Clone
C++ l10b.cpp 19 lines (16 loc) | 321 Bytes
1
#include <bits/stdc++.h>
2
3
using namespace std;
4
5
double power(double a, int n) {
6
double p = 1;
7
for (int i = 1; i <= n; ++i) {
8
p *= a;
9
}
10
return p;
11
}
12
13
int main() {
14
double a;
15
int n;
16
cin >> a >> n;
17
cout << fixed << setprecision(9) << power(a, n);
18
return 0;
19
}
20
21