what is wrong with this code?
int myFunction(int b)
{
int c;
double z = b;
double d;
int y=0;
while (d<0)
{
d= (z/pow(10,y));
c = (int)d;
c = c%10;
if (!(c=1))
++y;
else
b=0;
}
return b;
}
The compiler gets 3 erros of the pow():
- math.h(575): could be 'long double pow(long double,int)'
- math.h(527): or 'float pow(float,int)'
- math.h(489): or 'double pow(double,int)'
thx
Mandana