fork(1) download
  1. #include <stdio.h>
  2.  
  3.  
  4. int main() {
  5. const double PI= 3.14;
  6. double s ;
  7. double r ;
  8. printf("请输入圆的半径:");
  9. scanf("%lf", &r);
  10. s = PI*r*r;
  11.  
  12. printf("圆的面积为%.2f\n", s);
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
请输入圆的半径:圆的面积为0.00