Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main()
- {
- int centerX = 0;
- int centerY = 0;
- int radius = 2;
- Console.WriteLine("Coordinates of point x: ");
- double x = double.Parse(Console.ReadLine());
- Console.WriteLine("Coordinates of point y: ");
- double y = double.Parse(Console.ReadLine());
- if (Math.Pow((x - centerX), 2) + Math.Pow((y - centerY), 2) <= Math.Pow(radius, 2))
- {
- Console.WriteLine(true);
- }
- else
- {
- Console.WriteLine(false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment