数组 x[] x是代表地址么?
#include <stdio.h>#include <math.h>
int main()
{
double x[2], y[2];
while (scanf("%lf%lf%lf%lf", x[0], y[0], x[1], y[1]) != EOF)
printf("%.2f\n", sqrt((x[1]-x[0])*(x[1]-x[0]) + (y[1]-y[0])*(y[1]-y[0])));
return 0;
}
2013-10-11 16:37