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 PointInACircle
- {
- class PointInACircle
- {
- static void Main(string[] args)
- {
- Console.Write("Enter the X coordinates: ");
- double x2 = double.Parse(Console.ReadLine());
- Console.Write("Enter the Y coordinates: ");
- double y2 = double.Parse(Console.ReadLine());
- double r = 2.0;
- double x1 = 0.0;
- double y1 = 0.0;
- if ((Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2)) <= r * r)
- {
- Console.WriteLine("true");
- }
- else
- {
- Console.WriteLine("false");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement