Date su 4 tacke. Izracunati P cetvorougla (voditi racuna da li su tacke kolinearne ili ne). Pomoc: Koristiti funkciju "duzina duzi". A(x1,y1), B(x2,y2), C(x3,y3), D(x4,y4). #include #include #include using namespace std; float duzinaStrane (float a, float b, float c, float d) { return sqrt(pow(a-c,2) + pow(b-d,2)); } float povrsina (float a, float b, float c) { float s = (a+b+c)*0.5; float d = (s*(s-a)*(s-b)*(s-c)); return d; } int main() { float x1,y1,x2,y2,x3,y3,x4,y4, min, ab, bc, cd, ad, ac, obim, pov; cout<<"Unesite koordinate tacke A: "<>x1>>y1; cout<<"Unesite koordinate tacke B: "<>x2>>y2; cout<<"Unesite koordinate tacke C: "<>x3>>y3; cout<<"Unesite koordinate tacke D: "<>x4>>y4; ab = duzinaStrane(x1,y1,x2,y2); bc = duzinaStrane(x2,y2,x3,y3); cd = duzinaStrane(x3,y3,x4,y4); ad = duzinaStrane(x1,y1,x4,y4); ac = sqrt(pow (x1-x3,2) + pow ((y1-y3),2)); pov = povrsina(ad,ac,cd) + povrsina(ab, bc, ac); obim = ab+bc+cd+ad; cout<<"Obim je: " << obim<