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. if (a<0) {
  10. a*=-1;
  11. }
  12. if (b<0) {
  13. b*=-1;
  14. }
  15. cout<<sqrt(a*b)<<endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 3460KB
stdin
-544.59 -12
stdout
-278.295
80.8398