{"id":42839,"date":"2018-06-09T17:23:29","date_gmt":"2018-06-09T11:23:29","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=42839"},"modified":"2018-06-19T17:46:39","modified_gmt":"2018-06-19T11:46:39","slug":"%d0%bd%d0%b0%d1%85%d0%be%d0%b6%d0%b4%d0%b5%d0%bd%d0%b8%d0%b5-%d0%bd%d0%b0%d0%b8%d0%b1%d0%be%d0%bb%d1%8c%d1%88%d0%b5%d0%b5-%d0%b7%d0%bd%d0%b0%d1%87%d0%b5%d0%bd%d0%b8%d0%b5-%d1%8d%d0%bb%d0%b5%d0%bc","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=42839","title":{"rendered":"\u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 (Arduino)"},"content":{"rendered":"<p>\u0414\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0438\u0436\u0435:<\/p>\n<pre style=\"background: #0c1021; color: #f8f8f8;\"><span style=\"color: #8da6ce;\">int<\/span> arr[] <span style=\"color: #fbde2d;\">=<\/span> {<span style=\"color: #d8fa3c;\">100<\/span>,<span style=\"color: #d8fa3c;\">22<\/span>,<span style=\"color: #d8fa3c;\">12<\/span>,<span style=\"color: #d8fa3c;\">134<\/span>,<span style=\"color: #d8fa3c;\">80<\/span>}; <span style=\"color: #aeaeae;\">\/\/ \u043c\u0430\u0441\u0441\u0438\u0432 <\/span>\r\n<span style=\"color: #8da6ce;\">int<\/span> arr_max <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>; <span style=\"color: #aeaeae;\">\/* \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441 \u043d\u0443\u043b\u0435\u043c \u0431\u0443\u0434\u0435\u043c \r\n                    \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 *\/<\/span>\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> setup(){\r\nSerial.begin(<span style=\"color: #d8fa3c;\">9600<\/span>);\r\n}\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> loop(){\r\n\r\n  <span style=\"color: #fbde2d;\">for<\/span>(<span style=\"color: #8da6ce;\">int<\/span> i <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>; i &lt;<span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">5<\/span>; i<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0446\u0438\u043a\u043b, \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/span>\r\n    arr_max <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #8da6ce;\">max<\/span>(arr_max, arr[i]); <span style=\"color: #aeaeae;\">\/* \u0444\u0443\u043d\u043a\u0446\u0438\u044f max \u0432\u044b\u0434\u044b\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439,\r\n    \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0441 \u043d\u0443\u043b\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\r\n    \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f, \u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u043e \u0432\u0442\u043e\u0440\u044b\u043c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435...\r\n    \u041f\u043e\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f max \u043d\u0435 \u0432\u044b\u0431\u0435\u0440\u0438\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. *\/<\/span>\r\n  }\r\n  delay(<span style=\"color: #d8fa3c;\">1000<\/span>);\r\n  Serial.println(arr_max);\r\n}\r\n<\/pre>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43059\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/785693763874.png\" alt=\"\" width=\"614\" height=\"369\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/785693763874.png 614w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/785693763874-200x120.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/785693763874-500x300.png 500w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0438\u0436\u0435: int arr[] = {100,22,12,134,80}; \/\/ \u043c\u0430\u0441\u0441\u0438\u0432 int arr_max = 0; \/* \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441 \u043d\u0443\u043b\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 *\/ void setup(){ Serial.begin(9600); } void loop(){ for(int i = 1; i &lt;= 5; i++){ \/\/ \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0446\u0438\u043a\u043b, \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 arr_max [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42813,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-42839","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":6161,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/42839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42839"}],"version-history":[{"count":4,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/42839\/revisions"}],"predecessor-version":[{"id":43060,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/42839\/revisions\/43060"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/42813"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42839"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}