Write a subroutine in Fortran to ascertain whether three points are collinear. Collinearity of three points...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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-yl) - (x3 - x1) * (y2-yl)=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 collinear. Collinearity of three points (x1, y1), (x2, y2), and (x3, y3) can be determined using the following formula: Collinearity formula: (x2-x1) * (y3-yl) - (x3 - x1) * (y2-yl)=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.
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these operating system questions
-
A matrix giving the correlation (r) for each pair of independent variables is shown above. Identify the independent variables that are highly correlated. What problems may result from including these...
-
Portray in words what transforms you would have to make to your execution to some degree (a) to accomplish this and remark on the benefits and detriments of this thought.You are approached to compose...
-
When will the gravitational force between you and the Sun be greater-today at noon, or tomorrow at midnight? Defend your answer.
-
Four-H, Inc., changed from straight-line to an accelerated depreciation method for book purposes only in 2018. Data for years affected by the change: *After tax; the tax rate is 40%. The income...
-
Refer to Problem 10-1. What is the projects PI?
-
Consider the multiple linear regression model fit to the rental price data in Problem 3.42. Problem 3.42 Table B.24 contains data on median family home rental price and other data for 51 US cities....
-
1. Social media can be described with three properties: (a) Very rich, vivid sensory experiences versus relatively simple, even impoverished sensory experiences; (b) Primarily social in nature versus...
-
A Corporation has purchased 1 , 0 0 0 shares of it s own common stock for $ 2 5 per share. The corporation later sells 5 0 0 shares of this treasury stock for $ 2 8 per share. Complete the journal...
-
I need help on this read from bottom to top. Image transcription text 7"} The second ?nancial statement to prepare is the statement of retained earnings. To determine the ending balance of...
-
Evaluate the integral. Show your work, and leave your answer in exact form. /2 sin(6x)cos(2x) dx /6
-
Using the semi-annually compounded yield curve below, price the following securities: Calculate for a 5 year zero-coupon bond T yield 0.25 6.33% 0.50 6.49% 0.75 6.62% 1.00 6.71% 1.25 6.79% 1.50 6.84%...
-
In column (4), does the elasticity of price with respect to size depend on the size of the house? Use a 5% level of significance for the test. The critical value is (two decimal places) The test...
-
In 1980, Saab-Scania plans to enter the agricultural machinery industry. As part of its expansion plan, Saab-Scania is looking to acquire a company specializing in artificial intelligence-assisted...
-
Prior to beginning work on this discussion forum, review the Narrowing a Topic and Developing a Research QuestionLinks to an external site. web page and Integrating Research Links to an external...
-
9.1. (10 points) What is the best value for k according to the output of KNN? Paste the KNN plot in the space below. 9.2. (10 points) Create the confusion matrix based on test data: Predict ed 0 1...
-
A Carnot heat pump operates between 0C and 22C. How much heat is transferred into the interior of a house for every 1.0 J of work the pump does?
-
Write out the formula for the total costs of carrying and ordering inventory, and then use the formula to derive the EOQ model. Andria Mullins, financial manager of Webster Electronics, has been...
-
Listing 2.7, ShowCurrentTime.java, gives a program that displays the current time in GMT. Revise the program so that it prompts the user to enter the time zone offset to GMT and displays the time in...
-
Rewrite the preceding program that uses a new greedy algorithm that places an object with the smallest weight into the first bin in which it would fit. Your program should prompt the user to enter...
-
The iterator is failfast. Write a program to demonstrate it by creating two threads that concurrently access and modify a set. The first thread creates a hash set filled with numbers, and adds a new...
-
Determine whether each of the following statements is true or false: Management accountants should be technically proficient, but they dont need strong oral and written communication skills.
-
Determine whether each of the following statements is true or false: Management accountants are now more often looked upon as internal business advisors rather than bean counters recording historical...
-
Determine whether each of the following statements is true or false: The Association of International Certified Professional Accountants (AICPA) issues the Certified Management Accountant (CMA)...
Study smarter with the SolutionInn App