[求助]输入与输出
求三角形的面积#include<stdio.h>
#include<math.h>
int
main()
{
float a,b,c,s,area;
printf("please enter 3 numbers:\n");
scanf("%f%f%f\n",&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%\n",a,b,c,s);
printf("area=%7.2f\n",area);
}
为什么执行时输入“345ENTER”却得不到预期的结果?
望各位指教,谢谢!