fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. #include<stdio.h>
  6. #include<math.h>
  7. int main(void)
  8. { double a,b,c,p,S;
  9. printf("请输入三角形的三条边长:");
  10. scanf("%d%d%d",&a,&b,&c);
  11. p=(a+b+c)/2.0;
  12. S=sqrt(p*(p-a)*(p-b)*(p-c));
  13. printf("该三角形的面积为:%.2f",S);
  14. return 0;
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5320KB
stdin
3 4 5
stdout
Standard output is empty