Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CenterPodouble
- {
- class Program
- {
- static void Main(string[] args)
- {
- double x1 = double.Parse(Console.ReadLine());
- double y1 = double.Parse(Console.ReadLine());
- double x2 = double.Parse(Console.ReadLine());
- double y2 = double.Parse(Console.ReadLine());
- string result=CheckPoints(x1,y1,x2,y2);
- Console.WriteLine(result);
- // Console.WriteLine(CheckPoints(x1,y1,x2,y2))
- }
- }
- static string CheckPoints(double x,double y,double d,double z)
- {
- double diagonalFirstPoint = (Math.Sqrt(x1 * x1 + y1 * y1));
- double diagonalSecondPoint = (Math.Sqrt(x2 * x2 + y2 * y2));
- if (diagonalFirstPoint<=diagonalSecondPoint)
- {
- return $"({x1}, {y1})");
- }
- else
- {
- return $"({x2}, {y2})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment