Write an user defined function that takes as input the x


Write an user defined function, that takes as input the x and y co-ordinate of three points, i.e. (x1,y1), (x2,y2) and (x3,y3). The output arguments represents the length of three side of a triangle i.e. l1,l2,l3. (25)

Conditions:-

1>If user gives input for just one point i.e. (x1,y1) show a warning that “You cannot for a triangle†and assign l1=0,l2=0 and l3=0.

2>If user gives input of two points i.e.(x1,y1) and (x2,y2) then assume (x3,y3)=(0,0)

And then calculate the length of three sides of the triangle.

3>If user gives less than two input number, or three inputs, five inputs, or more than six inputs, your program must terminate showing an error message.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write an user defined function that takes as input the x
Reference No:- TGS0662372

Expected delivery within 24 Hours