输入(x1,y1)和(x2,y2)。(注意符号为半角符号)
#include <stdio.h>
#include<math.h>
int main()
{
double x1,y1,x2,y2,s;
scanf("%lf,%lf",&x1,&y1);
#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){ float as,sd; float df,fg; scanf("%g,%g",&as,&sd); scanf("%g,%g",&df,&fg); float d = sqrt(pow((as-df),2)+pow((fg-sd),2)); printf("%g",d); return 0;}