#include<iostream>
#include<cmath>
#include<cstdlib>
using namespace std;
int main()
{
double r,perimeter,area;
cout<<"請輸入圓半徑"<<endl;
cin>>r ;
perimeter=2*3.14*r;
area=r*r*3.14 ;
cout<<"圓周長為:"<<perimeter<<endl;
cout<<"圓面積為:"<<area<<endl;
system("pause");
return 0;
}
|