[C] job language calculates the distance between two points

#include<stdio.h>
#include<math.h>
int main()
{
 int x1,y1,x2,y2;
 while(scanf("%d %d %d %d",&x1,&y1,&x2,&y2)!=EOF)
  printf("%.2f\n",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
 return 0;
}

[Mathematical function]

Guess you like

Origin www.cnblogs.com/asher0608/p/11689447.html