问一下这个输入1.2 2.3 5.8 10得到的sqrt为啥是0啊

#include<math.h>
#include<stdio.h>
int main(){
float a,b,c,d;
double e,f,g;
scanf("a=%f,b=%f,c=%f,d=%f",&a,&b,&c,&d);
f=(a-c),e=(b-d);
g=sqrt(pow(e,2)+pow(f,2));
printf("sqrt(%f)=%.2f\n",g);

}

语法有点错误,给你改了一下

#include<math.h>
#include<stdio.h>
int main() {
    float a, b, c, d;
    double e, f, g;
    scanf_s("%f %f %f %f", &a, &b, &c, &d);
    f = (a - c);
    e = (b - d);
    g = sqrt(pow(e, 2) + pow(f, 2));
    printf("sqrt(%f)=%f\n", pow(e, 2) + pow(f, 2),g);

}

img

你的printf好像只输出了一个参数