輸入三角形的三條邊判斷能否構成三角形若能

2021-09-01 23:07:32 字數 830 閱讀 6687

1樓:匿名使用者

#include

#indlude

#define acute_angel  1  /* 銳角 */

#define right_angel  2  /* 直角 */

#define obtuse_angel 3  /* 鈍角 */

bool is********(int a, int b, int c)

return r;

}int get********type(int a, int b, int c)

else if (b > a && b > c)

else

if (pow(max_long, 2) == pow(edge_m, 2) + pow(edge_k, 2))

else if (pow(max_long, 2) > pow(edge_m, 2) + pow(edge_k, 2))

else

return type;

}int main()

else

type = get********type(a, b, c);

if (type == right_angel)

else if (type == obtuse_angel)

else

return 0;

}這是最笨的方法,還可以通過三角函式來判斷,不過都忘光了

2樓:你猜我猜哇擦猜

#include

#include

void main()

else

printf("not tring\n");}

輸入三角形的三條邊a,b,c,判斷他們能否構成三角形,若能構

include include main floata,b,c,s 0,x 0 printf 輸入三角形三條邊的邊長 scanf f f f a,b,c if a b c b c a a c b x a b c s sqrt x x a x b x c printf area 3f n s else...

輸入三角形任意三條邊,判斷是否能夠成三角形,如果可以構成三角形求面積C語言

include void main else getch c語言 輸入三角形三邊a,b,c,判斷是否能構成三角形 include void main else printf n輸入錯誤!include int main include include int main void while a b ...

已知三角形三條邊怎麼求面積,已知三角形的三邊長如何求面積?

已知三角形的三邊,可以使用海 式直接計算出三角形的面積,公式中三角形的面積s p p a p b p c 其中p a b c a,b,c是三角形的三條邊。海 式又譯作希 式 海龍公式 希羅公式 海倫 秦九韶公式。它是利用三角形的三條邊的邊長直接求三角形面積的公式。相傳這個公式最早是由古希臘數學家阿基...