fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. double pi = 3.14159;
  5. double r; scanf("%lf", &r);
  6. if(r <= 0){
  7. printf("ERROR");
  8. return 0;
  9. }
  10. double x = 2.0 * r * pi;
  11. printf("%lf\n", x);
  12. printf("%lf", pi * r * r);
  13. }
Success #stdin #stdout 0s 5284KB
stdin
1
stdout
6.283180
3.141590