Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This program uses the topics discussed in Chapter 3 , input / output interactivity, formatting output, and usingthe cmath library. Write a program that asks
This program uses the topics discussed in Chapter inputoutput interactivity, formatting output, and usingthe cmath library. Write a program that asks the user toenter the x and y coordinates of two points. That isxy and x y The program should: Find the distance, r between the two points usingthe Pythagorean Theorem. Find the slope, m of the line that joins the two points. Find the midpoint of the line connecting these two points. Find the equation of the line in standard form.All functions are to be from the cmath library. Use setprecision with fixedpoint notation. Use float or double data types. Do not use the same value for xand x This will cause the compiler to divide by zero. Formulas to be used are: Distance r SQRT xxyy Midpoint xxyy Slope m yyxx Standard Form: y mx mx yYour output should look like this:Enter the value of x:Enter the value of x:Enter the value of y:Enter the value of y:The distance from these two points is:The midpoint of the line joining these two points is:The equation of the line in standard form isThis program uses the topics discussed in Chapter
putoutput interactivity, formatting output, and using
ne cmath library. Write a program that asks the user to
nter the and coordinates of two points. That is
and The program should:
Find the distance, between the two points using
the Pythagorean Theorem.
Find the slope, of the line that joins the two points.
Find the midpoint of the line connecting these two points.
Find the equation of the line in standard form.
All functions are to be from the cmath library. Use setprecision with fi
oint notation. Use float or double data types. Do not use the same value fo
nd This will cause the compiler to divide by zero. Formulas to be used a
Distance
Midpoint
Slope
Standard Form:
Your output should look like this:
Enter the value of :
Enter the value of :
Enter the value of :
Enter the value of :
The distance from these two points is:
The midpoint of the line joining these two points is:
The equation of the line in standard form is:
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