{"id":3253,"date":"2017-11-26T16:42:14","date_gmt":"2017-11-26T13:42:14","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3253"},"modified":"2017-12-06T00:35:59","modified_gmt":"2017-12-05T21:35:59","slug":"ml-24-3","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3253","title":{"rendered":"ML 24"},"content":{"rendered":"<p><strong>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<p>\u0422\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0437\u0430\u0434\u0430\u043d \u0434\u043b\u0438\u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0440\u043e\u043d. \u041d\u0430\u0439\u0442\u0438 \u0440\u0430\u0434\u0438\u0443\u0441 \u0432\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 <span id=\"MathJax-Element-6-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]r[\/latex]<\/span><\/span>\u00a0\u0438\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 <span id=\"MathJax-Element-7-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]R[\/latex]<\/span><\/span>\u00a0\u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p><a href=\"http:\/\/java.mazurok.com\/wp-content\/uploads\/triangle.bmp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3292\" src=\"http:\/\/java.mazurok.com\/wp-content\/uploads\/triangle.bmp\" alt=\"\" width=\"261\" height=\"260\" \/><\/a><\/p>\n<p><strong>\u0422\u0435\u0441\u0442\u044b:<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><span id=\"MathJax-Element-3-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]a[\/latex]<\/span><\/span><\/td>\n<td><span id=\"MathJax-Element-4-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]b[\/latex]<\/span><\/span><\/td>\n<td><span id=\"MathJax-Element-5-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]c[\/latex]<\/span><\/span><\/td>\n<td><span id=\"MathJax-Element-6-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]r[\/latex]<\/span><\/span><\/td>\n<td><span id=\"MathJax-Element-7-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]R[\/latex]<\/span><\/span><\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>1<\/td>\n<td>2.5<\/td>\n<\/tr>\n<tr>\n<td>7.5<\/td>\n<td>10<\/td>\n<td>13<\/td>\n<td>2.45012<\/td>\n<td>6.52361<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>0<\/td>\n<td>inf<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>1<\/td>\n<td>3<\/td>\n<td>\u041d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442!<\/td>\n<td>\u041d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442!<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/strong><\/p>\n<pre class=\"lang:java decode:true\">import java.util.*;\r\n\r\npublic class triangle {\r\n\r\n    public static void main(String[] args) {\r\n        Scanner in = new Scanner(System.in);\r\n        System.out.print(\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 a: \");\r\n        double a = in.nextDouble();\r\n        System.out.print(\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 b: \");\r\n        double b = in.nextDouble();\r\n        System.out.print(\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 c: \");\r\n        double c = in.nextDouble();\r\n            double p = (a + b + c) \/ 2;\r\n            double S = Math.sqrt(p * (p - a) * (p - b) * (p - c)); \/\/\u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0413\u0435\u0440\u043e\u043d\u0430\r\n            double r = S \/ p;\r\n            double R = a * b * c \/ (4 * S);\r\n            System.out.println(\"\u0420\u0430\u0434\u0438\u0443\u0441 \u0432\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0432\u0435\u043d \" + r);\r\n            System.out.println(\"\u0420\u0430\u0434\u0438\u0443\u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0432\u0435\u043d \" + R);\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c:<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (\u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d):<\/p>\n<pre class=\"start-line:16 lang:java decode:true\">double p = (a + b + c) \/ 2;\r\ndouble S = Math.sqrt(p * (p - a) * (p - b) * (p - c)); \/\/\u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0413\u0435\u0440\u043e\u043d\u0430\r\ndouble r = S \/ p;\r\ndouble R = a * b * c \/ (4 * S);\r\nSystem.out.println(\"\u0420\u0430\u0434\u0438\u0443\u0441 \u0432\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0432\u0435\u043d \" + r);\r\nSystem.out.println(\"\u0420\u0430\u0434\u0438\u0443\u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0432\u0435\u043d \" + R);<\/pre>\n<ol>\n<li>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440 <span id=\"MathJax-Element-6-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]p[\/latex]<\/span><\/span>\u00a0\u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430: <span id=\"MathJax-Element-6-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]p[\/latex] = [latex]\\frac{a + b + c}{2}[\/latex]<\/span><\/span><span id=\"MathJax-Element-10-Frame\" class=\"MathJax_PlainSource\"><\/span><\/li>\n<li>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u044c <span id=\"MathJax-Element-7-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]S[\/latex]<\/span><\/span>\u00a0\u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0413\u0435\u0440\u043e\u043d\u0430: <span id=\"MathJax-Element-7-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]S[\/latex] = [latex]\\sqrt{p(p-a)(p-b)(p-c)}[\/latex]<\/span><\/span><\/li>\n<li>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0440\u0430\u0434\u0438\u0443\u0441 <span id=\"MathJax-Element-6-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]r[\/latex]<\/span><\/span>\u00a0\u0432\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:\u00a0<span id=\"MathJax-Element-6-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]r[\/latex] = [latex]\\frac{S}{p}[\/latex]<\/span><\/span><\/li>\n<li>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0440\u0430\u0434\u0438\u0443\u0441 <span id=\"MathJax-Element-7-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]R[\/latex]<\/span><\/span>\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435: <span id=\"MathJax-Element-7-Frame\" class=\"MathJax_SVG\" style=\"border: 0px;font-family: inherit;font-size: 13px;font-style: normal;font-weight: normal;margin: 0px;padding: 0px;vertical-align: baseline;line-height: normal;text-indent: 0px;text-align: left;letter-spacing: normal;float: none;direction: ltr;max-width: none;max-height: none;min-width: 0px;min-height: 0px\" role=\"presentation\"><span class=\"MJX_Assistive_MathML\" role=\"presentation\">[latex]R[\/latex] = [latex]\\frac{abc}{4S}[\/latex]<\/span><\/span><\/li>\n<\/ol>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 <a href=\"https:\/\/ideone.com\/7dwaxk\">Ideone.com<\/a><\/p>\n<p><a href=\"http:\/\/cpp.mazurok.com\/ml-24\/\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438: \u0422\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0437\u0430\u0434\u0430\u043d \u0434\u043b\u0438\u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0440\u043e\u043d. \u041d\u0430\u0439\u0442\u0438 \u0440\u0430\u0434\u0438\u0443\u0441 \u0432\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 [latex]r[\/latex]\u00a0\u0438\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 [latex]R[\/latex]\u00a0\u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u0422\u0435\u0441\u0442\u044b: [latex]a[\/latex] [latex]b[\/latex] [latex]c[\/latex] [latex]r[\/latex] [latex]R[\/latex] 3 4 5 1 2.5 7.5 10 13 2.45012 6.52361 1 3 4 0 inf 1 1 3 \u041d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442! \u041d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442! \u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b: import java.util.*; public class triangle { public static void main(String[] args) { Scanner in &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3253\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":101,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[41,322,134,224,69,90,86],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3253"}],"collection":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/users\/101"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3253"}],"version-history":[{"count":24,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3253\/revisions"}],"predecessor-version":[{"id":3301,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3253\/revisions\/3301"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}