求助,只有40分
查看原帖
求助,只有40分
1237049
dgsm楼主2024/3/5 21:20
import java.util.Scanner;

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

2024/3/5 21:20
加载中...