Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- Console.Write("Enter x: ");
- decimal x = decimal.Parse(Console.ReadLine());
- Console.Write("Enter y: ");
- decimal y = decimal.Parse(Console.ReadLine());
- bool checktcircle = (((x-1) * (x-1) + (y-1) * (y-1))<9);
- bool checktrectangle = ((y > 1) || (y < (-1))) || (((y<1 ||y>(-1)) && (x<(-1))));
- if (checktcircle && checktrectangle)
- {
- Console.WriteLine("The point is in the circle and outside the rectangle.");
- }
- else
- {
- Console.WriteLine("The point is NOT in the circle and outside rectnagle at the same time.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement