这个程序在devc++上能正常运行,但是在洛谷上报错,请问是哪里出了问题
查看原帖
这个程序在devc++上能正常运行,但是在洛谷上报错,请问是哪里出了问题
1507002
ysbsvhaha楼主2024/10/23 00:39

#include<stdio.h> #include<math.h> int main () {
float a,b,c,p,s,h,n; scanf("%f%f%f",&a,&b,&c); p=(a+b+c)/2; s=sqrt(p*(p-a)(p-b)(p-c)); h=s-int(s); if(h<0.5) { s=(int)s; printf("%0.1f",s);} else { n=(int)s+1; printf("%0.1f",n);} return 0; }

2024/10/23 00:39
加载中...