由键盘输入三个数,计算以这三个数为边长的三角形的面积.#include main(){ ______;printf("please enter 3 reals:\n");scanf("%f%f%f",&a, &b, &c);if(____){ s=(a+b+c)*0.5; s1=s*(s-a)*(s-b)*(s-c); s=_____;printf("\n Area of the t
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 19:35:50
由键盘输入三个数,计算以这三个数为边长的三角形的面积.#include main(){ ______;printf("please enter 3 reals:\n");scanf("%f%f%f",&a, &b, &c);if(____){ s=(a+b+c)*0.5; s1=s*(s-a)*(s-b)*(s-c); s=_____;printf("\n Area of the t
由键盘输入三个数,计算以这三个数为边长的三角形的面积.
#include
main()
{
______;
printf("please enter 3 reals:\n");
scanf("%f%f%f",&a, &b, &c);
if(____)
{
s=(a+b+c)*0.5;
s1=s*(s-a)*(s-b)*(s-c);
s=_____;
printf("\n Area of the triangle is %f\n", s);
}
_________
printf("It is not triangle!\n");
system("pause");
}
这个应该如何完成程序,谢谢各位大侠帮忙填写完整,学习!
由键盘输入三个数,计算以这三个数为边长的三角形的面积.#include main(){ ______;printf("please enter 3 reals:\n");scanf("%f%f%f",&a, &b, &c);if(____){ s=(a+b+c)*0.5; s1=s*(s-a)*(s-b)*(s-c); s=_____;printf("\n Area of the t
#include <math.h>
main()
{
float a,b,c,s,s1;
printf("please enter 3 reals:\n");
scanf("%f%f%f",&a, &b, &c);
if(a<b+c&&b<a+c&&c<a+b)
{
s=(a+b+c)*0.5;
s1=s*(s-a)*(s-b)*(s-c);
s=sqrt(s1);
printf("\n Area of the triangle is %f\n", s);
}
else
printf("It is not triangle!\n");
system("pause");
}