c语言求一组对数问题(调用)

#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?

请前辈指教。

没有这样的用法啊float LOG(unsigned m)(unsigned n)
可以改成如下

#include <stdio.h>
#include <math.h>

using namespace std;
float LOG(float m, float 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");
}

运行结果:
图片说明

原来如此。已懂,多谢。(〜 ̄▽ ̄)〜