用c语言计算两点间的距离 简介 #include <math.h>#include <stdio.h>void main(){float x1, y1, x2, y2;float d;printf("请输入x1,y1,x2,y2,用空格隔开:\n");scanf("%f %f %f %f", &x1, &y1, &x2, &y2);d 正文 1 #include <math.h>#include <stdio.h>void main(){float x1, ...
回答:# define struct { double x, y;} point; double distance(point a, b){ return (sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y) ));}