fork(1) download
  1. #include <iostream>
  2. #include <math.h>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. int main () {
  7. double a,b;
  8. cin >> a >> b;
  9. cout << fixed << setprecision(2) << sqrt(a*a+b*b) << " " << a*b/2 << endl ;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3460KB
stdin
42 56
stdout
70.00 1176.00