Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you make it in printf, scanf form? Thanks. 2. In function main declare coordinates for two points (xl, yl, x2, y2) and slope m
Can you make it in printf, scanf form? Thanks.
2. In function main declare coordinates for two points (xl, yl, x2, y2) and slope m and y-intercept b. Call a function get2points to read in the two sets of coordinates. Return the values to function main, pass by address(ie, use pointers to send all four values back to main). Call a second function slopeIntercept to calculate the values of slope m and intercept b for the form y mx+b. Function slopelntercept has six parameters, the four coordinate values and pointers to the slope and y-intercept. slopeIntercept should return slope and y-intercept to main using pointers. From main, print the final form of the equation Enclose the call statements in a while or do...while loop so that additional coordinates can be converted to the slope intercept format if desired. (ask the user to enter a Y if they want to enter more coordinate pairs) Test with coordinate pairs: (4,3) and (-2,1) (11) and (5,17.8) 2. In function main declare coordinates for two points (xl, yl, x2, y2) and slope m and y-intercept b. Call a function get2points to read in the two sets of coordinates. Return the values to function main, pass by address(ie, use pointers to send all four values back to main). Call a second function slopeIntercept to calculate the values of slope m and intercept b for the form y mx+b. Function slopelntercept has six parameters, the four coordinate values and pointers to the slope and y-intercept. slopeIntercept should return slope and y-intercept to main using pointers. From main, print the final form of the equation Enclose the call statements in a while or do...while loop so that additional coordinates can be converted to the slope intercept format if desired. (ask the user to enter a Y if they want to enter more coordinate pairs) Test with coordinate pairs: (4,3) and (-2,1) (11) and (5,17.8)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