{"id":1818,"date":"2017-05-28T11:21:13","date_gmt":"2017-05-28T08:21:13","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=1818"},"modified":"2017-11-26T23:19:20","modified_gmt":"2017-11-26T20:19:20","slug":"ml4_%d0%bb%d0%b8%d0%bd%d0%b5%d0%b9%d0%bd%d1%8b%d0%b5-%d0%b2%d1%8b%d1%87%d0%b8%d1%81%d0%bb%d0%b5%d0%bd%d0%b8%d1%8f","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=1818","title":{"rendered":"ML4. \u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f"},"content":{"rendered":"<p><strong>\u0423\u0441\u043b\u043e\u0432\u0438\u0435<\/strong><br \/>\n\u0414\u0430\u043d\u044b \u0434\u0432\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430. \u041d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u044d\u0442\u0438\u0445 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p><strong>\u0422\u0435\u0441\u0442\u044b<\/strong><\/p>\n<table width=\"257\">\n<tbody>\n<tr>\n<td>\u2116<\/td>\n<td>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<td>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>-1 -3<\/td>\n<td>-2 1.73205<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>5 6<\/td>\n<td>5.5 5.47723<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>4 6<\/td>\n<td>5 4.89898<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>100 2.6<\/td>\n<td>51.3 16.1245<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"lang:java decode:true \">package lab1;\r\nimport java.util.Scanner;\r\npublic class Lab1 \r\n{\r\n    public static void main(String[] args) \r\n    {\r\n        Scanner scanIn = new Scanner(System.in);\r\n        double a, b, P, Q;\r\n        a = scanIn.nextDouble();\r\n        b = scanIn.nextDouble();\r\n        P = (a + b) \/ 2;\r\n        Q = Math.sqrt(a * b);\r\n        System.out.println(\"(a + b) \/ 2 = \" + P + \"!\");\r\n        System.out.println(\"Math.sqrt(a * b) = \" + Q + \"!\");\r\n    }\r\n}<\/pre>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/strong><br \/>\n\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0447\u0438\u0441\u043b\u0430, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445\u00a0long double, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043e\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0438\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0447\u0438\u0441\u0435\u043b \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e\u00a0\u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439: $latex A=\\frac{x_1+x_2+ \\ldots +x_n}{n}$<span id=\"MathJax-Element-1-Frame\" class=\"MathJax_SVG\"><\/span>, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0437\u0430\u0434\u0430\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430, \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439: $latex A= \\frac{a+b}{2}$<span id=\"MathJax-Element-2-Frame\" class=\"MathJax_SVG\"><\/span>. \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435: $latex G=\\sqrt[n]{x_1+x_2+ \\ldots +x_n}$<span id=\"MathJax-Element-3-Frame\" class=\"MathJax_SVG\"><\/span>, \u043d\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b: $latex G=\\sqrt{a . b}$<span id=\"MathJax-Element-4-Frame\" class=\"MathJax_SVG\"><\/span><\/p>\n<p><a href=\"https:\/\/ideone.com\/zYu2Pq\">Ideone.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0414\u0430\u043d\u044b \u0434\u0432\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430. \u041d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u044d\u0442\u0438\u0445 \u0447\u0438\u0441\u0435\u043b. \u0422\u0435\u0441\u0442\u044b \u2116 \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 1 -1 -3 -2 1.73205 2 5 6 5.5 5.47723 3 4 6 5 4.89898 4 100 2.6 51.3 16.1245 package lab1; import java.util.Scanner; public class Lab1 { public static void main(String[] args) { Scanner &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=1818\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":91,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[313,304,148],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1818"}],"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\/91"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1818"}],"version-history":[{"count":16,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1818\/revisions"}],"predecessor-version":[{"id":3288,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1818\/revisions\/3288"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}