Question: 1 Overview Write a simple C program to calculate the slope - intercept form of a line equation. The program should prompt the user for

1 Overview
Write a simple C program to calculate the slope-intercept form of a line equation. The program should
prompt the user for the coordinates of the first point, x first, and then y, and then prompt the user for
the second point, x first and then y. After that, the program should calculate and then print out the slope
and y-intercept of the line and equation of the line in slope-intercept form y = mx + b.
The program should then prompt the user for the x coordinate of a third point and then print out the
corresponding y coordinate for that point.
Your program should
Request the user input two coordinates one number at a time. (For the user to input (x1,y1) and (x2,y2),
the program needs to request each number separately.)
Calculate the slope of the line and the y-intercept of the line.
Output the equation in the form y = mx+b subsituting the values you calculated for the slop and
y-intercept.
Request the user input a third x value.
Calculate the y value for this input.
Print the solution to the screen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!