#include <iostream>
#include <cmath>
using namespace std;
int main(){
double x1,y1,x2,y2;
while (cin >> x1 >> y1 >> x2 >> y2){
cout.precision(2);
cout << fixed << sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)) << endl;
}
return 0;
}
第一,输入,直接用四个变量在while语句中输入;
第二,cout输出流,格式设置,cout.precision(),cout<