展开全部
#include<iostream>
using namespace std;
#define mcr_pi (3.14)
int main(int argc, char* argv)
{
double d_circle_perimeter, d_circle_area; //圆的周长和面积
double d_circle_radius; //圆的半径
double *pd_circle_perimeter = &d_circle_perimeter, *pd_circle_area = &d_circle_area;
cin>>d_circle_radius; //键盘输入圆的半径
//求周长
*pd_circle_perimeter = 2 * mcr_pi * d_circle_radius;
//求面积
*pd_circle_area = mcr_pi * d_circle_radius * d_circle_radius;
cout<<"周长和面积分别是:"<<d_circle_perimeter<<" , "<<d_circle_area<<endl;
return 1;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询