You are on page 1of 1

#include <stdio.

h>
int main(){
float x1,y1,x2,y2,x3,y3,AB,AC,BC,p,s;
printf("Vnesi koordinati na tocka A\n");
scanf("%f%f",&x1,&y1);
printf("Vnesi koordinati na tocka B\n");
scanf("%f%f",&x2,&y2);
printf("Vnesi koordinati na tocka C\n");
scanf("%f%f",&x3,&y3);
AB=sqrt(pow(x1-x2,2)+pow(y1-y2,2));
AC=sqrt(pow(x1-x3,2)+pow(y1-y3,2));
BC=sqrt(pow(x2-x3,2)+pow(y2-y3,2));
printf("Rastojanieto AB e %f, Rastojanieto AC e %f i rastojanieto BC e %f",AB,AC
,BC);
s=(AB+AC+BC)/3;
p=sqrt(s*(s-AB)*(s-AC)*(s-BC));
printf("Plostinata na triagolnikot e %f",p);}

You might also like