I wrote this function it should return a double but the compiler returns this error:
line 38: incorrect function return type
this is my code line 38 is the second line
line 38: incorrect function return type
this is my code line 38 is the second line
Code:
double expon(int n, int m, int o, int p)
{
int i;
double temp;
temp = 1;
for (i = 1; i < (m + 1); i++)
{
temp = temp * n;
if (p == 1)
{
while (temp > (double)o)
{
temp = temp - o;
}
}
}
return temp;
}