Question: Declare double variables x 1 , y 1 , x 2 , and y 2 , and read each variable from input in that order.

Declare double variables x1, y1, x2, and y2, and read each variable from input in that order. Find the midpoint between point (x1, y1) and point (x2, y2) and assign the result to xMidpoint and yMidpoint.
The calculation is: midpoint=(x1+x22,y1+y22)
Ex: If the input is 3.52.51.05.0, then the output is:

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