Advertisement
Fundamentalen

PointInACircle

Mar 14th, 2014
1,876
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2.  
  3. class PointInACircle
  4. {
  5.     static void Main()
  6.     {
  7.         Console.Write("x = ");
  8.         double x = double.Parse(Console.ReadLine());
  9.         Console.Write("y = ");
  10.         double y = double.Parse(Console.ReadLine());
  11.  
  12.         bool isInside = (x * x) + (y * y) <= (2 * 2);
  13.  
  14.         Console.WriteLine("These coordinates are inside the circle = " + isInside);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement