Question: The user is supposed to enter two points (x,y) and then its supposed to calculate the distance between the two points and display it on

The user is supposed to enter two points (x,y) and then its supposed to calculate the distance between the two points and display it on the output screen.

I am having problems with my math down at the bottom, the complier doesnt like it. Can someone please tell me whats wrong with it? Also, if you see any other mistakes, please let me know. Thanks!

The user is supposed to enter two points (x,y) and then its

#include struct point float x: float y; void enter a point (struct point pc) float distance (struct point p1, struct point p2) int main (void) struct point pt1, pt2 enter a point (&pt 1) enter a point &pt2) distance (pt pt2) printf ("Distance between the points 3.2fAna", distance (pt1, pt2) return 0; void enter a point (struct point pc) printf ("Enter X value for point: An") scanf ("tf", pc->x) printf ("Enter Y value for point: An") scanf ("tf", &pc->y) float distance (struct point pl, struct point p2) float d: sqrt (pow (p2.x-p 1.x) 2) pow ((p2.y-pl y), 2) return

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 Databases Questions!