DEV C++运行下述程序,报出出现了一个问题 导致程序停止正常工作,什么原因?
#include<stdio.h>#include<math.h>intmain(void){doublea,b,c,s,area;scanf("%lf","%lf","...
#include <stdio.h>
#include <math.h>
int main(void)
{
double a,b,c,s,area;
scanf("%lf","%lf","%lf",&a,&b,&c);
s=(a+b+c)/2;
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("a=%.2f,b=%.2f,c=%.2f,s=%.2f\n",a,b,c,s);
printf("area=%.2f\n",area);
return 0;
} 展开
#include <math.h>
int main(void)
{
double a,b,c,s,area;
scanf("%lf","%lf","%lf",&a,&b,&c);
s=(a+b+c)/2;
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("a=%.2f,b=%.2f,c=%.2f,s=%.2f\n",a,b,c,s);
printf("area=%.2f\n",area);
return 0;
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询