輸入三角形的3邊長,求三角形面積

假設三角形三邊長a,b,c,面積公式以下: area= √(s(s-a)(s-b)(s-c)); s = (a+b+c)×1/2 注意:此處用到數學庫函數「math.c」提供的sqrt 代碼以下:ios #include<iostream> #include<math.h> using namespace std; int main() { cout << "請輸入三條邊的長:" << e
相關文章
相關標籤/搜索