fork download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. double Heron(double a,double b,double c)
  7. {
  8. double p, Pole;
  9. p=(a+b+c)/2;
  10. Pole = sqrt(p*(p-a)*(p-b)*(p-c))/0;
  11. return Pole;
  12.  
  13.  
  14. }
  15.  
  16. int main() {
  17. // your code goes here
  18. cout<<Heron(3,4,15);
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0.01s 5408KB
stdin
Standard input is empty
stdout
-nan