C++程序设计:2.02
#include<iostream>
using namespace std;
int main()
{
double l,r;
double a,v;
cout<<"Enter the radius and length of a cylinder:";
cin>>r>>l;
a=r*r*3.14159;
v=a*l;
cout<<"The area is"<<" "<<a<<endl;
cout<<"The volume is"<<" "<<v<<endl;
return 0;
}