This function calculate the power of a number by n.
int dg_pow(int number, int pow);
int dg_pow(10, 5);
int dg_pow(int number, int pow)
{
int result = number;
if (pow == 0)
return 1;
if (pow > 0)
for (int i = 1; i < pow; i++)
result *= number;
else
result = number / dg_pow(number, 1 - pow);
return result;
}