Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

In order of importance, list six benefits of objectives.

Answered: 1 week ago

Question

=+ e. What happens to Oceanias real exchange rate?

Answered: 1 week ago