#include
using namespace std;
int main()
{
int r,h;
cout<<"please input two number:"<<'\n';
cin>>r>>h;
cout<<"radious:"<<r<<"high:"<<h<<endl;
double v=3.14*r*r*h;
cout<<"The volume is:"<<v<<endl;
return 0;
}帮我改改,让体积的结果精确到小数点后三位,谢谢!
体积那句改为:cout << "The volumn is:" << fixed << setprecision(3) << v << endl;
要加头文件iomanip