Write a thorough C++ program that when loving the x and y coordinates of couple tops on a continuity, the program calculates and exhibits the slope and the midpoint of that continuity.
Your output should exhibit the ancient couple tops, the extobject and the midtop in a disentangled unconfused mode.
The loving C++ program takes the object coordinates of the continuity- x1,y1 and x2,y2.
It then calculates the extobject of the continuity using humble formula, extobject = (x2-x1)/(y2-y1).
And the mid top using the mid-top formula: midx = (x1+x2)/2 and midy = (y1+y2)/2.
using namespace std;
float x1, x2, y1, y2;
float midx, midy;
cout<<“Enter the x1, y1 coordinates:n”;
cout<<“Enter the x2, y2 coordinates:n”;
extobject = (x2-x1)/(y2-y1);
midx = (x1+x2)/2;
midy = (y1+y2)/2;
cout<<“The entered tops of the continuity are:n”;
cout<<“(“<<x1<<“,”<<y1<<“) and “;
cout<<“nThe extobject of the continuity is: “<<slope;
cout<<“nThe midtop of the continuity is: (“<<midx<<“,”<<midy<<“)”;