fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. double a, x, y,r;
  7. cin >> a >> x >> y >> r;
  8.  
  9. cout << 4 * a << " " << a * a << endl;
  10. cout << 2 * (x + y) << " " << x * y << endl;
  11.  
  12. double pi = acos(-1);
  13.  
  14. cout << fixed << setprecision(2)
  15. << 2 * pi * r << " "
  16. << pi * r * r;
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
0 0
1.86619e-309 0
0.00 0.00