shenyunwen

/*计算圆的面积*/
#include<stdio.h>
int main(void)
{
    double R,S;/*R为圆的半径,S为圆的面积*/
    printf("Enter R:");
    scanf("%lf",&R);
    if(R<=0){/*判断输入的值是否正确*/
    printf("Enter is wrong !");
    }
    else{
        S=3.14*R*R;
    }
        printf("S=%.2lf\n",S);

    return 0;
}

 

 

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2021-11-23
  • 2021-11-27
  • 2022-02-22
  • 2022-03-01
猜你喜欢
  • 2022-02-17
  • 2021-11-08
  • 2022-02-21
  • 2021-12-02
  • 2021-12-01
  • 2022-03-03
  • 2022-12-23
相关资源
相似解决方案