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 and can be determined
using the following formula:
Collinearity formula:
The subroutine will take the coordinates of the three points and
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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
