求一个数的几次方
#include <iostream>
using namespace std;
int main(void)
{
int f = 0;
int a = 0;
int g = 0;
cin >> a >> f;
for(int i = 1; i <= f; i++)
{
g = a * a;
}
cout << g;
return 0;
}
求一个数的几次方
#include <iostream>
using namespace std;
int main(void)
{
int f = 0;
int a = 0;
int g = 0;
cin >> a >> f;
for(int i = 1; i <= f; i++)
{
g = a * a;
}
cout << g;
return 0;
}