Untitled

 avatar
unknown
plain_text
2 years ago
280 B
3
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...