已婚妇女梦到初恋男友:又编了一个C++程序帮忙找找错谢谢

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 03:41:43
系统说:cin>>a>>b>>c>>endl;
s=sqrt(p(p-a)(p-b)(p-c));这两行有错

#include<iostream.h>
#include<math.h>
void main ()
{
int a,b,c,l,s,p;
cout<<"qing shu ru san bian bian chang ."<<endl;
cin>>a>>b>>c>>endl;
l=a+b+c;
p=(a+b+c)/2;
s=sqrt(p(p-a)(p-b)(p-c));
cout<<"l="<<l<<' '<<"s="<<s<<endl;
}