fork(1) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. long double a, b;
  7. cin >> a >> b;
  8. cout << (a+b)/2 << endl;
  9. cout << sqrt(a*b) << endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3464KB
stdin
100 2.6
stdout
51.3
16.1245