Szukałem w internecie i na każdej stronie są wpisane inne biblioteki i inne te polecenia. Po uruchomieniu wyskakuje: "Pole trójkąta wynosi=0".
#include <iostream>
#include <cmath>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv)
{
int a,b,c,p,S;
cout<<"Podaj bok a"<<endl;
cin>>a;
cout<<"Podaj bok b"<<endl;
cin>>b;
cout<<"Podaj bok c"<<endl;
cin>>c;
p=0.5*(a+b+c);
S=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<"Pole trojkata wynosi:"<<S;
system("pause");
return 0;
}