public power(int num, int power)
{
int num2;
if (power == 0 && num!=0)
{
num2 = 1;
}
else if (power == 1)
{
num2 = num;
Type: Posts; User: javapenguin
public power(int num, int power)
{
int num2;
if (power == 0 && num!=0)
{
num2 = 1;
}
else if (power == 1)
{
num2 = num;
You know there already is a class called Math that has a method called power that takes two numbers and raises the first number to the power of the second number.