{"id":660,"date":"2016-07-01T11:15:52","date_gmt":"2016-07-01T08:15:52","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=660"},"modified":"2016-07-03T23:09:38","modified_gmt":"2016-07-03T20:09:38","slug":"ml-24","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=660","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 <img decoding=\"async\" class=\"latex\" title=\"r\" src=\"http:\/\/s0.wp.com\/latex.php?latex=r&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"r\" \/> \u0438\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 <img decoding=\"async\" class=\"latex\" title=\"R\" src=\"http:\/\/s0.wp.com\/latex.php?latex=R&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"R\" \/>\u00a0\u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p><strong>\u0422\u0435\u0441\u0442\u044b :<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><img decoding=\"async\" class=\"latex\" title=\"a\" src=\"http:\/\/s0.wp.com\/latex.php?latex=a&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"a\" \/><\/td>\n<td><img decoding=\"async\" class=\"latex\" title=\"b\" src=\"http:\/\/s0.wp.com\/latex.php?latex=b&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"b\" \/><\/td>\n<td><img decoding=\"async\" class=\"latex\" title=\"c\" src=\"http:\/\/s0.wp.com\/latex.php?latex=c&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"c\" \/><\/td>\n<td><img decoding=\"async\" class=\"latex\" title=\"r\" src=\"http:\/\/s0.wp.com\/latex.php?latex=r&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"r\" \/><\/td>\n<td><img decoding=\"async\" class=\"latex\" title=\"R\" src=\"http:\/\/s0.wp.com\/latex.php?latex=R&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"R\" \/><\/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.450117<\/td>\n<td>6.5236096<\/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\nimport java.lang.*;\r\nimport java.io.*;\r\n\r\nclass Ideone\r\n{\r\n\tpublic static void main (String[] args)\r\n\t{\r\n\t\tfloat a, b, c;\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter values: \");\r\n\t\ta = scanner.nextFloat();\r\n\t\tb = scanner.nextFloat();\r\n\t\tc = scanner.nextFloat();\r\n\t\tif (a + b &gt;= c || b + c &gt;= a || a + c &gt;= b) {\r\n\t\t\tfloat p = (a + b + c) \/ 2;\r\n\t\t\tfloat S = (float) Math.sqrt(p * (p - a) * (p - b) * (p - c));\r\n\t\t\tfloat R = (a * b * c) \/ (4 * S);\r\n\t\t\tfloat r = S\/p;\r\n\t\t\tSystem.out.println(\"Radius of incircle of triangle = \" + r + \"\\nRadius of excircle of triangle = \" + R);     \r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Wrong input data. Triangle doesn't exist\");\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c :<\/p>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a. \u0412 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435 \u0441\u0443\u043c\u043c\u0430 \u0434\u043b\u0438\u043d \u043b\u044e\u0431\u044b\u0445 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u0440\u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043b\u0438\u043d\u044b \u0442\u0440\u0435\u0442\u044c\u0435\u0439 (\u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u0430 \u0435\u0435 \u0434\u043b\u0438\u043d\u0435, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u043c). \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e :<\/p>\n<pre class=\"lang:java decode:true\">if (a + b &lt; c || b + c &lt; a || a + c &lt; b) {\r\n            System.out.println(\"Wrong input data. Triangle doesn't exist\");\r\n        }<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\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<ol>\n<li>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440 <img decoding=\"async\" class=\"latex\" title=\"p\" src=\"http:\/\/s0.wp.com\/latex.php?latex=p&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"p\" \/>\u00a0\u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430:\u00a0<img decoding=\"async\" class=\"latex\" title=\"p\" src=\"http:\/\/s0.wp.com\/latex.php?latex=p&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"p\" \/> =\u00a0<img decoding=\"async\" class=\"latex\" title=\"\\frac{a + b + c}{2}\" src=\"http:\/\/s0.wp.com\/latex.php?latex=%5Cfrac%7Ba+%2B+b+%2B+c%7D%7B2%7D&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"\\frac{a + b + c}{2}\" \/><\/li>\n<li>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u044c <img decoding=\"async\" class=\"latex\" title=\"S\" src=\"http:\/\/s0.wp.com\/latex.php?latex=S&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"S\" \/>\u00a0\u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0413\u0435\u0440\u043e\u043d\u0430: <img decoding=\"async\" class=\"latex\" title=\"S\" src=\"http:\/\/s0.wp.com\/latex.php?latex=S&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"S\" \/> = <img decoding=\"async\" class=\"latex\" title=\"\\sqrt{p(p-a)(p-b)(p-c)}\" src=\"http:\/\/s0.wp.com\/latex.php?latex=%5Csqrt%7Bp%28p-a%29%28p-b%29%28p-c%29%7D&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"\\sqrt{p(p-a)(p-b)(p-c)}\" \/><\/li>\n<li>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0440\u0430\u0434\u0438\u0443\u0441\u00a0<img decoding=\"async\" class=\"latex\" title=\"r\" src=\"http:\/\/s0.wp.com\/latex.php?latex=r&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"r\" \/> \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<img decoding=\"async\" class=\"latex\" title=\"r\" src=\"http:\/\/s0.wp.com\/latex.php?latex=r&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"r\" \/> =\u00a0<img decoding=\"async\" class=\"latex\" title=\"\\frac{S}{p}\" src=\"http:\/\/s0.wp.com\/latex.php?latex=%5Cfrac%7BS%7D%7Bp%7D&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"\\frac{S}{p}\" \/><\/li>\n<li>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0440\u0430\u0434\u0438\u0443\u0441\u00a0<img decoding=\"async\" class=\"latex\" title=\"R\" src=\"http:\/\/s0.wp.com\/latex.php?latex=R&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"R\" \/> \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:\u00a0<img decoding=\"async\" class=\"latex\" title=\"R\" src=\"http:\/\/s0.wp.com\/latex.php?latex=R&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"R\" \/> =\u00a0<img decoding=\"async\" class=\"latex\" title=\"\\frac{abc}{4S}\" src=\"http:\/\/s0.wp.com\/latex.php?latex=%5Cfrac%7Babc%7D%7B4S%7D&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"\\frac{abc}{4S}\" \/><\/li>\n<\/ol>\n<p><strong> \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 Ideone.com : <\/strong><br \/>\n<a href=\"http:\/\/ideone.com\/Ix3eM7\">Ideone.com<\/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 \u0438\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u00a0\u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u0422\u0435\u0441\u0442\u044b : 3 4 5 1 2.5 7.5 10 13 2.450117 6.5236096 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.*; import java.lang.*; import java.io.*; class Ideone { public static void main (String[] args) { &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=660\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":84,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[83,84,85,86],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/660"}],"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\/84"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=660"}],"version-history":[{"count":5,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/660\/revisions"}],"predecessor-version":[{"id":672,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/660\/revisions\/672"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}