fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. const double pi = 3.1415926535897932384626433832795;
  8. int r;
  9. cin >> r;
  10. printf("%5.3f \n%5.3f", pi * r * r, 2 * pi * r);
  11. return 0;
  12. }
Success #stdin #stdout 0s 15232KB
stdin
5
stdout
78.540 
31.416