Question: Write a subroutine in Fortran to ascertain whether three points are collinear. Collinearity of three points ( x 1 , y 1 ) , (

Write a subroutine in Fortran to ascertain whether three points are collinear.
Collinearity of three points (x1,y1),(x2,y2), and (x3,y3) can be determined
using the following formula:
Collinearity formula: (x2-x1)**(y3-y1)-(x3-x1)**(y2-y1)=0
The subroutine will take the coordinates of the three points (x1,y1),(x2,y2), and
(x3,y3) as inputs and will return a logical value. If the points are collinear, the
subroutine should return true; otherwise, it should return false.
Additionally, develop a main program that prompts the user to input the
coordinates of the three points. After calling the subroutine to check collinearity,
the main program should print an appropriate message indicating whether the
points are collinear or not.
 Write a subroutine in Fortran to ascertain whether three points are

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!