fork download
  1. #include "stdio.h"
  2. #include "math.h"
  3.  
  4. int main (){
  5. double a, b;
  6.  
  7. scanf("Enter a: %lf %lf", &a, &b);
  8.  
  9. double c = sqrt(a*a + b*b);
  10.  
  11. double p = a + b + c;
  12. double s = a*b/2;
  13.  
  14. printf("p = %lf", p);
  15. printf("s = %lf", s);
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5288KB
stdin
3 4
stdout
p = 0.000000s = 0.000000