问题及代码:
void CTriangleDlg::OnButton1()
{
double p;
UpdateData();
p=(m_a+m_b+m_c)/2;
m_area=sqrt(p*(p-m_a)*(p-m_b)*(p-m_c));
UpdateData(FALSE);
}
运行结果:
问题及代码:
void CTriangleDlg::OnButton1()
{
double p;
UpdateData();
p=(m_a+m_b+m_c)/2;
m_area=sqrt(p*(p-m_a)*(p-m_b)*(p-m_c));
UpdateData(FALSE);
}
运行结果: