#include <iostream>
using namespace std;
#define PI 3.14159265
int main()
{
    double r=0;
    cout<<"请输入半径: ";
    cin>>r;
    cout<<r<<endl;
    double mj =PI*r*r;
    double zc =2*PI*r;
    cout<<"面积: "<<mj<<endl;   //符号常量值不能改变
    cout<<"周长: "<<zc<<endl;
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: