#include
#include
#include
using namespace std;
int main()
{
double r,h,c,area1,area2,v1,v2,pi;
#define pi 3.1415;
cout<<"請輸入半徑:"<
cin>>r>>h;
c=2*pi*r;
area1=pi*r;
area2=4*pi*r*r;
v1=4/3*pi*r*r*r;
v2=pi*r*r*h;
cout<<"圓周長"<<"c="<<c<<"圓面積"<<"area1="<<area1<<"圓球表面積"<<"area2="<<area2<<"圓球體積"<<"v1="<<v1<<"圓柱體積"<<"v2="<<v2<<endl;
return 0;
}
#define pi 3.1415; 注意define 後沒有; define 應該將pi 代替為3.1415;了,多了個;good question.