-
#include <iostream>
using namespace std;
int main()
{
double r,h,s;
cout<<"请输入r,h的值:";
cin>>r>>h;
s=3.14*2.0*r*h+2.0*3.14*r*r;
cout<<"s="<<s<<endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
double r,h,s;
cout<<"请输入r,h的值:";
cin>>r>>h;
s=3.14*2.0*r*h+2.0*3.14*r*r;
cout<<"s="<<s<<endl;
return 0;
}