一、运行结果;
二、源代码;
# define _CRT_SECURE_NO_WARNINGS
# include <stdio.h>
# include <math.h>int main()
{//初始化变量值;double a, b, c, s, area;//赋值;a = 3.67;b = 5.43;c = 6.21;//运算求s;s = (a + b + c) / 2;//运算求面积;//sqrt函数式开根号函数;area = sqrt(s * (s - a) * (s - b) * (s - c));//输出结果;printf("a = %f\tb = %f\tc = %f\n", a, b, c);printf("三角形的面积 area = %f\n", area);return 0;
}
三、N-S流程图;