Advertisement
Krissy

CSharp_t6_PointInCircle

Nov 13th, 2012
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2.  
  3. class CheckPointInTheCircle
  4. {
  5.     static void Main()
  6.     {
  7.         Console.WriteLine("Please enter the first coordinate x of the point:");
  8.         double xValue = double.Parse(Console.ReadLine());
  9.         Console.WriteLine("Please enter the second coordinate y of the point:");
  10.         double yValue = double.Parse(Console.ReadLine());
  11.         Console.WriteLine(Math.Pow(xValue, 2) + Math.Pow(yValue, 2) < Math.Pow(5, 2)?"The point is within the circle K(0,5).":"The point is outside the circle K(0,5).");
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement