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 NumberInCircle
- {
- class Program
- {
- static void Main()
- {
- int radius = 2;
- Console.WriteLine("Enter x coordinate: ");
- double x = double.Parse(Console.ReadLine());
- Console.WriteLine("Enter y coordinate: ");
- double y = double.Parse(Console.ReadLine());
- double point = Math.Sqrt(x*x + y*y);
- if (point <= radius)
- {
- Console.WriteLine("Point is in cirlce");
- }
- else
- {
- Console.WriteLine("Nooooooooo");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment