郑州轻工业大学OJ:java1014

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
double a;
double b;
double c;
double p;
double S;
Scanner in=new Scanner(System.in);
a=in.nextDouble();
b=in.nextDouble();
c=in.nextDouble();
p=(a+b+c)/2.0;
S=Math.sqrt(p*(p-a)(p-b)(p-c));
System.out.println(String.format("%.2f", S));
}

}

你可能感兴趣的:(郑州轻工业大学OJ:java1014)