作者:手机用户2502919817_667 | 来源:互联网 | 2023-10-14 18:23
#define_CRT_SECURE_NO_WARNINGS#include#definePI3.1416doublecircu(doubler)函数定义,形参{
#define _CRT_SECURE_NO_WARNINGS
#include
#define PI 3.1416
double circu(double r)//函数定义,形参
{
return 2 * PI * r;
}
int main() //主函数
{
double mr, mc; //实参
scanf("%lf", &mr);
mc = circu(mr);
printf("半径为%.2lf的圆的周长为%.2lf\n", mr, mc);
}
#define _CRT_SECURE_NO_WARNINGS
#include
#define PI 3.1416
double circu(double r)//函数定义,形参
{
return 2 * PI * r;
}
int main() //主函数
{
double mr, mc; //实参
scanf("%lf", &mr);
mc = circu(mr);
printf("半径为%.2lf的圆的周长为%.2lf\n", mr, mc);
}点击打开代码