标题
补齐函数求长方体体积
#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b,c,v;
cin>>a>>b>>c;
cout<<"length="<<fixed<<setprecision(2)<<a<<','<<"width="<<fixed<<setprecision(2)<<b<<','<<"height="<<fixed<<setprecision(2)<<c<<endl;
cout<<"the volume of cube is "<<fixed<<setprecision(2)<<a*b*c;
return 0;
}
结果:
输入:
3 4 5
输出:
length=3.00,width=4.00,height=5.00
the volume of cube is 60.00