C语言:用指针这样求圆的直径,面积和周长哪里错了呢?#include#define Pai 3.14void zhijing_mianji_zhouchang(double r,double );main(){double r,mianji,zhouchang,zhijing;printf("请输入半径");scanf("%lf",&r);zhijing_mianji_zhouchan

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/23 20:09:30
C语言:用指针这样求圆的直径,面积和周长哪里错了呢?#include#define Pai 3.14void zhijing_mianji_zhouchang(double r,double );main(){double r,mianji,zhouchang,zhijing;printf(
x[K`ǿMNFv/73_1 # R ŠD~;\Zۜdu<ߘIgiy{튭P)ʍwSaE7{/h#۾4B  5r":}`,!: m:y`?-Pt

C语言:用指针这样求圆的直径,面积和周长哪里错了呢?#include#define Pai 3.14void zhijing_mianji_zhouchang(double r,double );main(){double r,mianji,zhouchang,zhijing;printf("请输入半径");scanf("%lf",&r);zhijing_mianji_zhouchan
C语言:用指针这样求圆的直径,面积和周长哪里错了呢?
#include
#define Pai 3.14
void zhijing_mianji_zhouchang(double r,double );
main()
{double r,mianji,zhouchang,zhijing;
printf("请输入半径");
scanf("%lf",&r);
zhijing_mianji_zhouchang(r,&zhijing,&mianji,&zhouchang);
printf("直径为%lf,面积为%lf,周长为%lf",zhijing,mianji,zhouchang);
}
zhijing_mianji_zhouchang(double r,double *p1,double *p2,double *p3)
{*p1=r*2;
*p2=Pai*r*r;
*p3=Pai*(r*2);
}

C语言:用指针这样求圆的直径,面积和周长哪里错了呢?#include#define Pai 3.14void zhijing_mianji_zhouchang(double r,double );main(){double r,mianji,zhouchang,zhijing;printf("请输入半径");scanf("%lf",&r);zhijing_mianji_zhouchan
函数声明都不对啊!一共四个参数怎么就声明两个参数?