{"id":101509,"date":"2025-03-14T14:48:39","date_gmt":"2025-03-14T11:18:39","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/homework-ml3\/"},"modified":"2025-03-14T14:48:39","modified_gmt":"2025-03-14T11:18:39","slug":"homework-ml3","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/homework-ml3\/","title":{"rendered":"\u062a\u06a9\u0627\u0644\u06cc\u0641"},"content":{"rendered":"<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>\nusing System.Runtime.CompilerServices;\n\npublic struct Point\n{\n    public int X { get; set; }\n    public int Y { get; set; }\n\n    public Point(string? input)\n    {\n        var inputArray = input.Split(' ');\n        X = int.Parse(inputArray[0]);\n        Y = int.Parse(inputArray[1]);\n    }\n\n    public double DistanceTo(Point other)\n    {\n        var cSquare = Math.Pow(X - other.X, 2) + Math.Pow(Y - other.Y, 2);\n        return Math.Sqrt(cSquare);\n    }\n}\n\npublic struct Circle\n{\n    public Point Center { get; set; }\n    public int Radius { get; set; }\n\n\n    public bool Includes(Point point)\n    {\n        var distance = point.DistanceTo(Center);\n        return distance &lt; Radius;\n    }\n}\n\n<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u06a9\u062f \u06a9\u0647 \u0628\u0647 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc C # \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u0628\u0631\u0627\u06cc \u0628\u06cc\u0627\u0646 \u0627\u0634\u06a9\u0627\u0644 \u0647\u0646\u062f\u0633\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0627\u062e\u062a\u0627\u0631\u0647\u0627 (\u0633\u0627\u062e\u062a\u0627\u0631) \u0637\u0631\u0627\u062d\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0634\u0627\u0645\u0644 \u0633\u0627\u062e\u062a\u0627\u0631\u0647\u0627\u06cc \u0646\u0642\u0637\u0647 (\u0646\u0642\u0637\u0647) \u0648 \u062f\u0627\u06cc\u0631\u0647 (\u062f\u0627\u06cc\u0631\u0647) \u0627\u0633\u062a. \u0628\u06cc\u0627\u06cc\u06cc\u062f \u06a9\u062f \u0631\u0627 \u0628\u0647 \u0642\u0637\u0639\u0627\u062a \u0628\u067e\u0631\u062f\u0627\u0632\u06cc\u0645 \u0648 \u0647\u0631 \u0628\u062e\u0634 \u0631\u0627 \u0628\u0627 \u062c\u0632\u0626\u06cc\u0627\u062a \u062a\u0648\u0636\u06cc\u062d \u062f\u0647\u06cc\u0645.<\/p>\n<p>\u062e\u0648\u0627\u0635<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>\npublic int X { get; set; }\npublic int Y { get; set; }\n\n<\/code><\/pre>\n<\/div>\n<p><strong>\u0639\u0645\u0648\u0645\u06cc<\/strong> &#8211; \u0627\u06cc\u0646 \u0628\u0647 \u0634\u0645\u0627 \u0627\u0645\u06a9\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u0628\u0647 \u0633\u0627\u06cc\u0631 \u0642\u0633\u0645\u062a \u0647\u0627\u06cc \u06a9\u062f \u0645\u0631\u0627\u062c\u0639\u0647 \u06a9\u0646\u06cc\u062f.<br \/>\n<strong>\u062f\u0631 \u0646\u0638\u0631 \u06af\u0631\u0641\u062a\u0646<\/strong> &#8211; \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0627 \u062f\u0631 \u0646\u0648\u0639 \u0634\u0645\u0627\u0631\u0647 (\u0639\u062f\u062f \u0635\u062d\u06cc\u062d) \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc \u06a9\u0646\u062f.<br \/>\n<strong>x \u0628\u0631\u0648 y<\/strong> &#8211; \u0645\u062e\u062a\u0635\u0627\u062a \u0627\u0641\u0642\u06cc (x) \u0648 \u0639\u0645\u0648\u062f\u06cc (y) \u0627\u0632 \u0646\u0642\u0637\u0647.<br \/>\n<strong>\u0628\u062f\u0633\u062a \u0622\u0648\u0631\u062f\u0646<\/strong> &#8211; \u0628\u0631\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u0642\u062f\u0627\u0631 (\u062e\u0648\u0627\u0646\u062f\u0646) \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<br \/>\n<strong>\u062a\u0646\u0638\u06cc\u0645 \u06a9\u0631\u062f\u0646<\/strong> &#8211; \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0627\u0631\u0632\u0634 (\u0646\u0648\u0634\u062a\u0646) \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>\u0633\u0627\u0632\u0646\u062f\u0647<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>\npublic Point(string? input)\n{\n    var inputArray = input.Split(' ');\n    X = int.Parse(inputArray[0]);\n    Y = int.Parse(inputArray[1]);\n}\n\n<\/code><\/pre>\n<\/div>\n<p>\u0637\u0631\u0627\u062d \u06cc\u06a9 \u0631\u0648\u0634 \u062e\u0627\u0635 \u0627\u0633\u062a \u060c \u0628\u0647 \u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0628\u0631 \u0631\u0648\u06cc \u0627\u06cc\u062c\u0627\u062f \u0634\u06cc \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>\u0631\u0634\u062a\u0647\u061f \u0648\u0631\u0648\u062f\u06cc &#8211; \u0627\u0639\u062f\u0627\u062f \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062a\u0646 \u0645\u06cc \u067e\u0630\u06cc\u0631\u062f (&#8220;10 20&#8221;).<\/p>\n<p>\u061f \u0639\u0644\u0627\u0645\u062a \u0628\u062f\u0627\u0646 \u0645\u0639\u0646\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0648\u0631\u0648\u062f\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u062a\u0647\u06cc \u0628\u0627\u0634\u062f.<\/p>\n<p>\u062a\u0642\u0633\u06cc\u0645 (&#39;&#39;) \u0628\u0647 \u062f\u0648 \u0642\u0633\u0645\u062a \u0627\u0632 \u0641\u0636\u0627 (&#39;&#39;) \u062a\u0642\u0633\u06cc\u0645 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>int.parse (inputarray[0]) &#8211; \u0645\u062a\u0646 \u0631\u0627 \u0628\u0647 \u06a9\u0644 \u0634\u0645\u0627\u0631\u0647 \u0645\u0627\u0646\u0646\u062f &#8220;10&#8221; \u06cc\u0627 &#8220;5&#8221; \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0628\u0647 x \u0648 y \u062d\u0641\u0638 \u0645\u06cc \u0634\u0648\u0646\u062f.\n<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>\npublic double DistanceTo(Point other)\n{\n    var cSquare = Math.Pow(X - other.X, 2) + Math.Pow(Y - other.Y, 2);\n    return Math.Sqrt(cSquare);\n}\n\n<\/code><\/pre>\n<\/div>\n<p>\u0631\u0648\u0634<\/p>\n<p>Distanceto \u0631\u0648\u0634\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0641\u0627\u0635\u0644\u0647 \u0628\u06cc\u0646 \u062f\u0648 \u0646\u0642\u0637\u0647 \u0631\u0627 \u0645\u062d\u0627\u0633\u0628\u0647 \u0645\u06cc \u06a9\u0646\u062f. \u0645\u062d\u0627\u0633\u0628\u0647 \u0628\u0631 \u0627\u0633\u0627\u0633 Pionoreca \u0627\u0633\u062a.<\/p>\n<p>\u0645\u0631\u0627\u062d\u0644 \u0645\u062d\u0627\u0633\u0628\u0627\u062a\u06cc<br \/>\nX &#8211; Atherh.x \u2192 \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u0645\u062e\u062a\u0635\u0627\u062a \u062f\u06cc\u06af\u0631. x \u2192 x.<br \/>\n\u0628\u06cc\u0646 \u0645\u062e\u062a\u0635\u0627\u062a \u062f\u06cc\u06af\u0631. y \u2192 y \u062a\u0641\u0627\u0648\u062a \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f.<br \/>\n\u0647\u0631 \u062f\u0648 \u062a\u0641\u0627\u0648\u062a \u0628\u0647 \u0645\u06cc\u062f\u0627\u0646 \u0627\u0641\u0632\u0627\u06cc\u0634 \u0645\u06cc \u06cc\u0627\u0628\u062f.<br \/>\n\u0646\u062a\u06cc\u062c\u0647 \u062d\u0627\u0635\u0644 \u0631\u06cc\u0634\u0647 \u0645\u0631\u0628\u0639 \u0627\u0633\u062a \u0648 \u0641\u0627\u0635\u0644\u0647 \u0645\u0634\u062e\u0635 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>using System.Runtime.CompilerServices; public struct Point { public int X { get; set; } public int Y { get; set; } public Point(string? input) { var inputArray = input.Split(&#8216; &#8216;); X = int.Parse(inputArray[0]); Y = int.Parse(inputArray[1]); } public double DistanceTo(Point other) { var cSquare = Math.Pow(X &#8211; other.X, 2) + Math.Pow(Y &#8211; other.Y, 2); return Math.Sqrt(cSquare); &hellip;<\/p>\n","protected":false},"author":2,"featured_media":100555,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-101509","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/101509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=101509"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/101509\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/100555"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=101509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=101509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=101509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}