hdu2001,控制小数位数
import java.util.Scanner;
import java.math.*;
import java.text.DecimalFormat;
public class j2001 {
public static void main(String[] args){
int x1,y1,x2,y2;
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
double x11 = sc.nextDouble();
double y11 = sc.nextDouble();
double x22 = sc.nextDouble();
double y22 = sc.nextDouble();
double ans = Math.sqrt((x11-x22)*(x11-x22)+(y11-y22)*(y11-y22));
DecimalFormat df = new DecimalFormat("#0.00");//控制小数位数两位
System.out.println(df.format(ans));
}
}
}