Question: Write a Scilab program, such that: a. Asks a user to enter the x-coordinate and y-coordinate of 3 points, point A, point B, and point

Write a Scilab program, such that: a. Asks a user to enter the x-coordinate and y-coordinate of 3 points, point A, point B, and point C (triangle vertices).

b. Calculate the length of side AB, AC and BC. You can use the following equation to calculate the length of each side = (1 2 )^ 2 + (1 2 ) ^2 = (1 3) 2 + (1 3) ^2 = (2 3) 2 + (2 3)^ 2

Display message on the console:

The length of side AB is ____

The length of side AC is ____

The length of side BC is ____ c.

Calculate the perimeter of the triangle called it p = AB + BC + AC.

Display a message on the console: The perimeter of triangle ABC is ____

d. Find the area of triangle ABC using the following formula = ( )( )( ) where p is the perimeter.

Display a message on the console: The area of triangle ABC is ____. e.

If the area is less than or equal 10, then display a message The triangle is small. f.

If the area is more than 10 but less than or equal 15, then display a message The triangle is medium.

g. If the area is more than 15, then display a message The triangle is large.

h. Plot the triangle.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!