Untitled
unknown
plain_text
3 years ago
280 B
7
Indexable
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int poww(float a, float b) {
int d = a;
if (b == 0) d = 1;
for (int i = 1; i < b; i++)
{
d *= a;
}
return d;
}
int main()
{
float a, b;
cin >> a >> b;
cout << poww(a, b);
}Editor is loading...