Question: Write a Fortran program to read information from the user for two lines (slope m, and I and y values for a point on the

Write a Fortran program to read information from the user for two lines (slope m, and I and y values for a point on the line), and output: the slope-intercept equation of each line y-y=mx-11), where (11, y1) is a point on the line); the point-slope equation of each line y=m+b where b is the y-intercept; a statement to indicate if the lines are parallel or perpendicular; the intersection point of the two lines if they intersect. Your program should include a derived data type representing a line and containing attributes for m, I, and y, and you should use an array of this type to store the information provided by the user. See Sample input/output cases below for output format. Sample input/output 1: Enter the slope for the line 1.5 Enter a point on the line 1 2 Point-slope equation: y- 2.00= 1.50(x- 1.00) Slope-intercept equation: y= 1.50x+ 0.50 Enter the slope for the line 2.2 Enter a point on the line 4 2 Point-slope equation: y- 2.00= 2.20 (x- 4.00) Slope-intercept equation: y= 2.20x+-6.80 The lines intersect Intersection point: (10.43,16.14) Sample input/output 2: Enter the slope for the line 1.5 Enter a point on the line 1 2 Point-slope equation: y- 2.00= 1.50 (x - 1.00) Slope-intercept equation: y= 1.50x+ 0.50 Enter the slope for the line 1.5 Enter a point on the line 54 Point-slope equation: y- 4.00= 1.50(x- 5.00) Slope-intercept equation: y= 1.50x+-3.50 Lines are parallel
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
