求大神写个输入三角形的三边求面积的C语言程序Input then length of the three lines of a triangle ,please calculate the area of it, andprint out the result 英语描写如上 要不要IF语句来判断啊

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 19:29:23
求大神写个输入三角形的三边求面积的C语言程序Input then length of the three lines of a triangle ,please calculate the area of it, andprint out the result  英语描写如上    要不要IF语句来判断啊

求大神写个输入三角形的三边求面积的C语言程序Input then length of the three lines of a triangle ,please calculate the area of it, andprint out the result 英语描写如上 要不要IF语句来判断啊
求大神写个输入三角形的三边求面积的C语言程序
Input then length of the three lines of a triangle ,please calculate the area of it, andprint out the result
英语描写如上 要不要IF语句来判断啊

求大神写个输入三角形的三边求面积的C语言程序Input then length of the three lines of a triangle ,please calculate the area of it, andprint out the result 英语描写如上 要不要IF语句来判断啊
#include<stdio.h>
#include<math.h>
double CalcArea(double a,double b,double c)
{
    double s;
    s=(a+b+c)/2;
    return sqrt(s*(s-a)*(s-b)*(s-c));
}
int main()
{
    double a,b,c;
    scanf("%lf %lf %lf",&a,&b,&c);
    if(a+b>c&&a+c>b&&b+c>a)
    {
        printf("%lf,%lf,%lf三条边组成的三角形面积为%lf\n",a,b,c,CalcArea(a,b,c));
    }
    else
    {
        printf("%lf,%lf,%lf构不成三角形\n",a,b,c);
    }
    return 0;
}

c 语言 输入三边求三角形的面积和周长? 输入三角形的三边,怎样用C语言编写求三角形面积的程序? C语言怎么做求三角形面积已知三边,求面积输入三边,输出面积 求大神写个输入三角形的三边求面积的C语言程序Input then length of the three lines of a triangle ,please calculate the area of it, andprint out the result 英语描写如上 要不要IF语句来判断啊 c语言求三角形面积给出三角形的三边的边长,求三角形的面积.输入数据分多组,每组占一行,每行输入三边边长,以空格隔开.输入以EOF结束.每行输出三角形的面积.精确到三位小数.样例输入1 2 2. 求输入三角形两边长和夹角,求面积 C语言编程能给个具体的过程吗 C语言:求三角形的面积根据输入的三角形的三边,判断是否能组成三角形,若可以则输出它的面积和类型(等腰,等边,直角,普通).按要求写程序.要求用简单的C语言写! C语言:输入三角形的三边,判断其能否组成三角形,是什么三角形?打印出三角形的面积! c语言程序,输入三角形三边的长度,判断是不是三角形,若是,在判断为何种三角形,并求其面积 在c语言中输入三角形的三边长啊a,b,c,求三角形的面积? Pascal语言题目《求三角形面积》已经三角形三边的长,求三角形的面积,对了,用海伦公式:p=(a+b+c)/2,s=√p*(p-a)*(p-b)*(p-c)编写一个程序,输入一个三角形的三条边a,b,c(a,b,c为实数),如果这三条边能 C语言倒三角形怎么写要求输入 行数n 然后对应输出一个倒三角形.求大神教一下aaaaa aaa a这种类型的,这是输入3 输出的结果 C语言编程,三角形面积的海伦公式为:area=开根号[s(s-a)(s-b)(s-c],其中s=(a+b+c)/2,a、b、c是三角形的三边.定义两个函数,一个和来求area,一个和来求s.从主函数中输入三边的长度,并检测是否合法,然 用C语言写程序求输入的50个同学的成绩平均分? 一道信息(c语言的题)输入三角型的三边,求三角型的面积海伦公式已知三角型的三边a,b,c ,p = ( a + b + c )/ 2 ,s = sqrt( p *(p-a)*(p-b)*(p-c));样例:输入:3 4 5输出:6.000000我写的是# include int main(){fre C语言编程问题,利用海伦公式求三角形面积我变了一个程序,要求输入可以构成三角形三边的三个数,求三个数的最大值,最小值,和三角形面积.运行没有错误但是面积的结果总是0 ,请各位高手帮 输入三角形的三边a、b、c(可以小数),求面积,并输出.如果构不成三角形,给出“data error”的信息提示.用VC编程 三角形知道三边求面积的公式?