Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class PointInCircle
- {
- static void Main()
- {
- Console.WriteLine("Enter the \"x\" & \"y\" coordinates: ");
- int x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- int cirleRadius = 5;
- bool result = x * x + y * y <= cirleRadius * cirleRadius;
- Console.WriteLine(result ? "The given cooredinates are within the circle" : "The given cooredinates are outside the circle");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement