Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _8.Center_Point
- {
- class Program
- {
- static void Main(string[] args)
- {
- decimal x1 = decimal.Parse(Console.ReadLine());
- decimal y1 = decimal.Parse(Console.ReadLine());
- decimal x2 = decimal.Parse(Console.ReadLine());
- decimal y2 = decimal.Parse(Console.ReadLine());
- ClosestPoint(x1, y1, x2, y2);
- }
- private static void ClosestPoint(decimal x1, decimal y1, decimal x2, decimal y2)
- {
- if ((Math.Abs(x1) <= Math.Abs(x2) && Math.Abs(y1) <= Math.Abs(y2)))
- Console.WriteLine($"({x1}, {y1})");
- else
- Console.WriteLine($"({x2}, {y2})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement