Автор: Cena (16.11.2011 в 23:36)
#include <iostream>
#include <math.h>
using namespace std;
int main()
{double AB,BC,AC,DF,FG,DG,PABC,PDFG,a2,a1,b2,b1,c2,c1,f2,f1,g2,g1,d2,d1;
cout<<"a2=";
cin>>a2;
cout<<"a1=";
cin>>a1;
cout<<"b2=";
cin>>b2;
cout<<"b1=";
cin>>b1;
cout<<"c2=";
cin>>c2;
cout<<"c1=";
cin>>c1;
cout<<"f2=";
cin>>f2;
cout<<"f1=";
cin>>f1;
cout<<"g2=";
cin>>g2;
cout<<"g1=";
cin>>g1;
cout<<"d2=";
cin>>d2;
cout<<"d1=";
cin>>d1;
AB=sqrt(((a2-a1)*(a2-a1))+((b2-b1)*(b2-b1)));
BC-sqrt(((b2-b1)*(b2-b1))+((c2-c1)*(c2-c1)));
AC=sqrt(((d2-d1)*(d2-d1))+((f2-f1)*(f2-f1)));
FG=sqrt(((f2-f1)*(f2-f1))+((g2-g1)*(g2-g1)));
DG=sqrt(((d2-d1)*(d2-d1))+((g2-g1)*(g2-g1)));
PABC=(AB+BC+AC)/2;
PDFG=(DF+FG+DG)/2;
if ((PABC-AB)*(PABC-BC)*(PABC-AC)>0 && ((PDFG-DF)*(PDFG-FG)*(PDFG-DG)>0)
if (PABC>PDFG)
cout<<"2*PABC="<<2*PABC<<"\t 2*PDFG="<<2*PDFG<<"\n";
system("PAUSE");
return EXIT_SUCCESS;
}
38 C:\Dev-Cpp\dev3.cpp expected `)' before "if"