Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- //Write an expression that checks if given podouble (x, y) is inside a circle K({0, 0}, 2)
- class PointInACircle
- {
- static void Main()
- {
- Console.Write("Enter x: ");
- double x = double.Parse (Console.ReadLine());
- Console.Write ("Enter y: ");
- double y = double.Parse (Console.ReadLine());
- bool isdoubleheCircle = (((x * x) + (y * y)) <= 2 * 2);
- Console.WriteLine(isdoubleheCircle);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement