#include <iostream>
using namespace std;
double s1,s2,s3;
double calc(double a,double b,double c)
{
s1=a*b;
s2=a*c;
s3=b*c;
return a*b*c;
}
int main()
{
double a,b,c;
cout<<"Input the length, width and height of a cuboid: ";
cin>>a>>b>>c;
cout<<"The volume is :"<<calc(a,b,c)<<endl;
cout<<"The areas of 3 different surface are: "<<s1<<" "<<s2<<" "<<s3<<endl;
}
温馨提示:答案为网友推荐,仅供参考