为什么这样写不行啊?
#include
using namespace std;
#include
int main()
{
float a,b,c;
cin>>a>>b>>c;
float x=sqrt((a/b)*c);
float y=sqrt((a/c)*b);
float z=sqrt((b/c)a);
float s=4(x+y+z);
cout<<s<<endl;
system("pause");
return 0;
}
int main()
{
float a,b,c;
cin>>a>>b>>c;
float x=sqrt((a/b)*c);
float y=sqrt((c/a)*b);
float z=sqrt((b/c)*a);
float s=4*(x+y+z);
cout<<s<<endl;
system("pause");
return 0;
}
```
假设三条边x,y,z,应该有x * y * z 的三次方等于a * b * c
那么x * y * z 等于 a * b * c开三次根号
假设 x * y = a,y * z = b,x * z = c
可以求出x,y,z
然后求和再乘以4