函数的定义如下:float areafloat afloat bfloat c float hs; h=05a+b+c; s=sqrthh-ah-bh-c;return s;1函数的调用部分代码写在下方假设实参为xyz:________________________
float x, y, z; float result; // 输入实参值 cout << "请输入三角形的三边长:"; cin >> x >> y >> z; // 调用函数并接收返回值 result = area(x, y, z); // 输出结果 cout << "三角形的面积为:" << result << endl;
原文地址: https://www.cveoy.top/t/topic/jgJ6 著作权归作者所有。请勿转载和采集!