import java.util.*;
public class main{
public static void main(String[] args) {
int x1, y1, x2, y2;
double mid_x, mid_y;
Scanner sc = new Scanner(System.in);
x1 = sc.nextInt();
y1 = sc.nextInt();
x2 = sc.nextInt();
y2 = sc.nextInt();
mid_x = (x1 + x2)/2.0;
mid_y = (y1 + y2)/2.0;
if(Math.abs(mid_x) > Math.abs((int)mid_x))
{
if(Math.abs(mid_y) > Math.abs((int)mid_y))
{
//x小數 y小數
System.out.printf("(" + mid_x + "," + mid_y + ")");
}
else
{
//x小數 y整數
System.out.printf("(" + mid_x + "," + (int)mid_y + ")");
}
}
else
{
if(Math.abs(mid_y) > Math.abs((int)mid_y))
{
//x整數 y小數
System.out.printf("(" + (int)mid_x + "," + mid_y + ")");
}
else
{
//x整數 y整數
System.out.printf("(" + (int)mid_x + "," +(int) mid_y + ")");
}
}
}
};
沒有留言:
張貼留言