import java.util.Scanner; class Test3_13{ public static void main(String[] args){ double a,b,c; double m,s; //定义面积为m Scanner scan=new Scanner(System.in); System.out.println(\请输入 a b c 的值:\ System.out.print(\ a=scan.nextDouble();
System.out.print(\ b=scan.nextDouble();
System.out.print(\ c=scan.nextDouble();
if(a+b>c){ if(a+c>b){ if(b+c>a){ s=(a+b+c)/2;
m=Math.sqrt(s*(s-a)*(s-b)*(s-c));
System.out.println(\该三角形边长a=\ System.out.println(\面积为:\ } else System.out.println(\该数值不能够构成三角形\ } else System.out.println(\该数值不能够构成三角形\
}
else System.out.println(\该数值不能够构成三角形\
}
}
分别为\\n
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库求三角形面积 - JAVA语言实现在线全文阅读。
相关推荐: