c语言求教,不知道如何修改这道题
#include <iostream>#include <cmath>
using namespace std;
void computeTriangle(float &a,float &p,float i,float j,float m);
void main()
{
int x = 0;
int y = 0;
int z = 0;
cout<<"请输入三角形的三边长:"<<endl;
cin>>x>>y>>z;
cout<<computeTriangle(float &a,float &p,float x,float y,float z)<<endl;
}
void computeTriangle(float &a,float &p,float i,float j,float m)
{
if(i+j<m||i+m<j||j+m<i)
cout<<"不能构成三角形"<<endl;
else
{
a = (1/4) * sqrt((i+j+m)*(i+j-m)*(i+m-j)*(j+m-i));
p = i + j + m;
cout<<"面积a="<<a<<"周长p="<<p<<endl;
}
}
哪里有问题呢