Question
* Use the point_t data type. Define a new function void read_point(point_t *p1); that will read in from the user three floating point numbers into
*
Use the point_t data type. Define a new function
void read_point(point_t *p1);
that will read in from the user three floating point numbers into
the point_t. Declare two point_t variables in main, and use the read_point
function to read in values to them. Define a
new function
float distance(const point_t *p1, const point_t *p2);
that should compute the euclidean distance between the two points
and return the result. Use the sqrt function that is in math.h
Your main function should call this
function to determine the distance between the two points and should
then print the result.
*/
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