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 SoftuniSv
- {
- class Program
- {
- static double Distance(Point p1, Point p2)
- {
- double d = Math.Sqrt((p1.x - p2.x)* (p1.x - p2.x) + (p1.y - p2.y)* (p1.y - p2.y));
- return d;
- }
- static bool IsInCircle(Circle c, Point p)
- {
- double d = Distance(p, c.center);
- if (d <= c.radius)
- {
- return true;
- }
- return false;
- }
- static bool IsIntersect(Circle c1, Circle c2)
- {
- }
- static void Main(string[] args)
- {
- Point c = new Point();
- c.x = 10;
- c.y = 20;
- Circle c1 = new Circle();
- c1.center = c;
- c1.radius = 50;
- Point p2 = new Point();
- p2.x = 10;
- p2.y = 13;
- Console.WriteLine(IsInCircle(c1, p2));
- c1.Print();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement