填空题
若输入3、4、5,程序的输出结果为
【6】 。
#include "math.h"
main ( )
float a, b, c, s, area;
scanf("%f,%f,%f",&a,&b,&c);
s=1.0/2*(a+b+c);
area=sqrt (s* (s-
- a) * (s-
- b) * (s-
- c));
printf ("a=%7.2f,b=%7.2f, c=%7.2f, s=%7.2f", a,b, c, s);
printf ("area=%7.2f/n", area);
【正确答案】
1、a=3.00,b=4.00,c=5.00,s=6.00,area=6.00
【答案解析】