#include #include int main(){ float xa,ya,xb,yb,xc,yc; float a,b,c,O,S,P; printf("Unesite koordinate xa,ya,xb,yb,xc,yc: "); scanf("%f %f %f %f %f %f",&xa,&ya,&xb,&yb,&xc,&yc); a = sqrt(powf(xb-xc,2)+powf(yb-yc,2)); b = sqrt(powf(xa-xc,2)+powf(ya-yc,2)); c = sqrt(powf(xa-xb,2)+powf(ya-yb,2)); O = a+b+c; S = O/2; P = sqrt(S*(S-a)*(S-b)*(S-c)); printf("O = %f, P = %f\n", O, P); return 0; }