Home / Expert Answers / Computer Science / declare-double-variables-x-1-y-1-x-2-and-y-2-and-read-each-variable-from-input-in-pa913

(Solved): Declare double variables \( x 1, y 1, x 2 \), and \( y 2 \), and read each variable from input in ...



Declare double variables \( x 1, y 1, x 2 \), and \( y 2 \), and read each variable from input in that order. Find the midpoi

Declare double variables \( x 1, y 1, x 2 \), and \( y 2 \), and read each variable from input in that order. Find the midpoint between point ( \( x \), \( y 1) \) and point \( (x 2, y 2) \) and assign the result to \( x \) Mid and \( y \) Mid. The calculation is: midpoint \( =\left(\frac{x_{1}+x_{2}}{2}, \frac{y_{1}+y_{2}}{2}\right) \) Ex: If the input is \( 3.55 .04 .52 .5 \), the output is: \( (4.00,3.75) \)


We have an Answer from Expert

View Expert Answer

Expert Answer


To find the midpoint of two points entered by the user. Java Program: import java.util.Scanner; public class Main { public stati
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe