fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. #define PI 3.14159
  6.  
  7. double r;
  8. scanf("%lf",&r);
  9. printf("circumference=%.2f\n",2*PI*r);
  10. printf("area=%.2f\n",PI*r*r);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 5288KB
stdin
2
stdout
circumference=12.57
area=12.57