#include<stdio.h> #include<math.h>void main () { float x1,x2,y1,y2; float l1,l2,l3;//shetah,Hekef; printf("Insert Cordination of X1\n"); scanf("%f",&x1); printf("Insert Cordination of X2\n"); scanf("%f",&x2);
printf("Insert Cordination of Y1\n"); scanf("%f",&y1); printf("Insert Cordination of y2\n"); scanf("%f",&y2); l1 =sqrt(pow(x1-x2,2) + pow(y1-y2,2) ); l2 =sqrt(pow(x1-0,2) + pow(y1-0,2) ); l3 =sqrt(pow(x2-0,2) + pow(y2-0,2) ); printf("The First Line is %f\n",l1); printf("The Second Line is %f\n",l2); printf("The Third Line is %f\n",l3); printf("The Sum the perimeter is : %f",l1+l2+l3); printf("The Sum of the area is : %f", }
|