Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Task7
  8. {
  9. class Task7
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("Value for x: ");
  14. double x = double.Parse(Console.ReadLine());
  15. Console.WriteLine("Value for y: ");
  16. double y = double.Parse(Console.ReadLine());
  17. Console.WriteLine("Value for x of the circle: ");
  18. double xc = double.Parse(Console.ReadLine());
  19. Console.WriteLine("Value for y of the circle : ");
  20. double yc = double.Parse(Console.ReadLine());
  21. double r = Math.Sqrt(xc * xc + yc * yc);
  22. bool isInside = (x- xc) *(x- xc) + (y- yc) * (y- yc) <r*r;
  23. Console.WriteLine(isInside);
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement