#include <math.h> //使用根號函數要用這個頭文件
void main()
{
double a;
double b;
double c;
double p;
cout<<"please input a number as one of the lines"<<endl;
cin>>a;
cout<<"please input another one"<<endl;
cin>>b;
cout<<"the last one is required to be larger than "<<b-a<<" smaller than "<<a+b<<endl;
cin>>c;
p=0.5*(a+b+c);
double res=sqrt(p*(p-a)*(p-b)*(p-c)); //註意,要開根號的...
cout<<"square is "<<res<<endl;
}