Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started