描述
输入两点坐标(X1,Y1)、(X2,Y2),计算并输出两点间的距离。 提示: 求平方根的函数为:float sqrtf(float ); 需要加头文件:math.h |
---|
输入
输入数据只有一组,占一行,由4个实数组成,分别表示x1,y1,x2,y2。数据之间用空格隔开 |
---|
输出
对于该组输入数据,输出占一行,结果保留两位小数 |
---|
输入示例
0 1 1 0 |
---|
输出示例
1.41 |
---|
c++示例
#include<iostream>
#include<iomanip>
#include<math.h>
using namespace std;
int main(