Ответ:
--- C# 7.3 ---
using System;
namespace CSLearn
{
class Program
struct Point
public Point(double x, double y)
X = x;
Y = y;
}
public double X { get; set; }
public double Y { get; set; }
static void Main(string[] args)
Point P = new Point(
int.Parse(Console.ReadLine()),
int.Parse(Console.ReadLine()));
Func<double, double> LinearFunction = x => -x + 6;
if (P.X > 0 && P.Y > 0 && LinearFunction(P.Y) > P.X)
Console.WriteLine("Содержит");
else
Console.WriteLine("Не содержит");
Console.ReadKey();
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
--- C# 7.3 ---
using System;
namespace CSLearn
{
class Program
{
struct Point
{
public Point(double x, double y)
{
X = x;
Y = y;
}
public double X { get; set; }
public double Y { get; set; }
}
static void Main(string[] args)
{
Point P = new Point(
int.Parse(Console.ReadLine()),
int.Parse(Console.ReadLine()));
Func<double, double> LinearFunction = x => -x + 6;
if (P.X > 0 && P.Y > 0 && LinearFunction(P.Y) > P.X)
{
Console.WriteLine("Содержит");
}
else
{
Console.WriteLine("Не содержит");
}
Console.ReadKey();
}
}
}