Question: Please add comments Perpendicular Distance Calculator In this assignment you will create a program that lets the user enter values for a line and a
Please add comments Perpendicular Distance Calculator In this assignment you will create a program that lets the user enter values for a line and a point. t will then compute the perpendicular distance from the point to the line. And finally compute the point on the line that is closest to that point. Start by creating a new CLion C Executable project. All your code will go in the main function. Please include a comment at the top of the code with your name. The first thing your code should do is to prompt the user to enter values for both the line and point in question. The line formula we will use is Ax+By+C-0, so the user will have to enter values for A, B and C. Note that these can be numbers with decimal points. Next the user should enter the point in question (XO,YO). These point x/y values should be whole numbers. See the following for the interaction that your program is expected to produce. Note that the green numbers were entered by the user: Enter line equation in the form Ax + By + C-0 A: 1.0 B: 1.0 C:-2.0 Enter point (XO, YO) X0: 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
