I have to do this problem. I\'m pretty confident with part A I justdon\'t know h
ID: 3618431 • Letter: I
Question
I have to do this problem. I'm pretty confident with part A I justdon't know how to put distance() into main() forpart B. Any help is appreciated for either part. Thankyou.A) Write a function named distance() that accepts therectangular coordinates of two points x1,y1 and x2,y2 and calculates and returns the distance between the twopoints.
B) Include the function written for A) in a working C program. Makesure your function is called from main() and correctlyreturns a value to main(). Have main() displaythe value returned and test the function by passing various data toit and verifying the returned value. In particular make sure yourfunction returns a value of 0 when both points are thesame.