请编写程序求圆形的面积并把3.1415926的值定义为符号常量pi

学习 时间:2026-05-30 18:45:52 阅读:714
请编写程序求圆形的面积并把3.1415926的值定义为符号常量pi

最佳回答

合适的鞋子

无奈的海燕

2026-05-30 18:45:52

也没说用啥语言,用C语言写了#include #define PI 3。1415926int main(void){float r = 0。0;float s = 0。0;printf("Please input the radius of circle:\n");scanf("%f",&r);s = PI * r * r;printf("The area of the circle is %f\n",s);return 0;}

最新回答共有2条回答

  • 勤奋的酸奶
    回复
    2026-05-30 18:45:52

    也没说用啥语言,用C语言写了#include #define PI 3。1415926int main(void){float r = 0。0;float s = 0。0;printf("Please input the radius of circle:\n");scanf("%f",&r);s = PI * r * r;printf("The area of the circle is %f\n",s);return 0;}

上一篇 黑眼睛听力mp3,跪求

下一篇 问一道三角形函数数学题