#include
#include
float LOG(unsigned m)(unsigned n)
{
return float log(n)/log(m);
}
void main()
{
float a=0,b=0;
printf("Please input the base:"
"\n");
scanf("%f",&a);
if (a>0&&a!=1)
{
printf("Please input the number:"
"\n");
while (scanf("%f",&b)!=0)
printf("log(%.2f)(%.2f)=%.2f\n",
a,b,LOG(a)(b));
}
else
printf("ERROR!\n");
return 0;
}
但调用失败,why?
请前辈指教。