#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;