{"id":457471,"date":"2025-04-25T21:01:34","date_gmt":"2025-04-25T21:01:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457471"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-04-25T21:01:34","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457471","title":{"rendered":"<span>\u041e \u0442\u043e\u043c \u043a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C \u043d\u0430 Python<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0436\u0435 \u0431\u044b\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0447\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u043e \u043d\u0435 &#171;\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C \u043d\u0430 Python&#187; \u0432\u0435\u0434\u044c \u043a\u043e\u0433\u0434\u0430 \u044f \u0434\u0435\u043b\u0430\u043b \u0435\u0433\u043e \u0442\u043e \u044f \u043d\u0435 \u0437\u043d\u0430\u043b \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C \u043d\u0430 Python.<\/p>\n<h2>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435<\/h2>\n<p>\u0412\u043e\u0442 \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b:<\/p>\n<ul>\n<li>\n<p>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 int \u0438 char (\u0432\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0431\u0430\u0433\u043e\u0432\u0430\u043d\u043d\u044b\u0439)<\/p>\n<\/li>\n<li>\n<p>\u041a\u0443\u0447\u0430 \u0446\u0438\u043a\u043b\u043e\u0432: do-while, while<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 if-else<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e void<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043a char \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 &#171;hello world&#187; \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u042d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b: +, -, \/, *, &lt;, &gt;, ==, !=<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0438\u043c\u044f = \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;)<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 (\u0442\u0438\u043f_\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043c\u044f = \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;)<\/p>\n<\/li>\n<li>\n<p>\u0410 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440&#8230; \u0415\u0449\u0451 \u043f\u043e\u0434\u0443\u043c\u0430\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>BNF \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0435. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043a\u0438\u0434\u0430\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">void fac(n) {   int f = 1;   while (n &gt; 1) {     f = f * n;     n = n - 1;   } }  void main() {   fac(5); }<\/code><\/pre>\n<p>\u041f\u0440\u0430\u0432\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0435 \u043a\u0430\u043a\u043e\u0433\u043e \u043a\u0440\u043e\u043c\u0435 <code>Execution finished<\/code>. \u041f\u043e\u0447\u0435\u043c\u0443? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0442\u043e \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e eval \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e stdout \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434, \u0442\u043e\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e. \u0412\u0441\u0435\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u0442\u0430\u043f\u0430:<\/p>\n<ol>\n<li>\n<p>\u041b\u0435\u043a\u0441\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0435\u0440 \u0441\u0442\u0440\u043e\u0438\u0442 AST<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h2>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0430 (printf):<\/p>\n<pre><code class=\"cpp\">void printf(mes) {   stdout = stdout + mes; }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u043f\u0430\u0439\u0442\u043e\u043d\u0430 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 mes. \u041d\u0443 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 stdout.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430:<\/p>\n<pre><code class=\"cpp\">void fac(n) {   int f = 1;   while (n &gt; 1) {     f = f * n;     n = n - 1;   } }<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0446 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <code>stdout = stdout + \"f\";<\/code> \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041d\u043e \u043f\u043e\u043a\u0430 \u043a\u0440\u043e\u043c\u0435 printf, \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0438 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0434\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0411\u043e\u043b\u0435\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0441\u0438\u043d\u0442\u0430\u0442\u0438\u043a\u0441 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 if-else. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 (\u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442):<\/p>\n<pre><code class=\"cpp\">if (\u0443\u0441\u043b\u043e\u0432\u0438\u0435) {   \/\/\u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 } \/\/\u0435\u0441\u043b\u0438 else \u043d\u0443\u0436\u0435\u043d else {   \/\/\u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c.<\/p>\n<p>\u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">void main() {   int x = 5;   if (x &lt; 10) {     x = 10;   }   else {     x = 5;   } }<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e x. \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c: \u043c\u0435\u043d\u044c\u0448\u0435 10? \u0422\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 10. \u0411\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u0441\u044f\u0442\u0438 \u0438\u043b\u0438 10? \u0411\u0443\u0434\u0435\u0442 5.<\/p>\n<p>\u0412\u0441\u0451 \u043b\u0435\u0433\u043a\u043e. \u0414\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c do-while. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<pre><code class=\"cpp\">do {   \/\/\u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 } while (\u0443\u0441\u043b\u043e\u0432\u0438\u0435);<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">void main() {   int a = 5;   do {     a = a - 1   } while (a &gt; 6); }<\/code><\/pre>\n<p>\u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c false. \u041d\u043e &#171;a&#187; \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 5 \u0430 4. \u0412 \u044d\u0442\u043e\u043c \u0432\u0435\u0441\u044c \u0441\u043c\u044b\u0441\u043b do-while.<\/p>\n<p>\u042f \u0434\u0443\u043c\u0430\u044e while \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0432\u0435\u0434\u044c \u044f \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0440\u0430\u043d\u0435\u0435.<\/p>\n<h2>\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 10:<\/p>\n<pre><code class=\"cpp\">\/\/\u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 void fib(n) {   int n1 = 1;   int n2 = 1;   int n3 = 1;   int count = n - 2;   while (count) {     n3 = n1 + n2;     n1 = n2;     n2 = n3;     count = count - 1;   } }  \/\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0430 void printf(mes) {   stdout = stdout + mes; }  \/\/\u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u044b void main() {   fib(10);   printf(\"'fibonacci of 10: '+str(n2)\"); }<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a. \u0418 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e while.<\/p>\n<p>\u0410 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<pre><code>Execution finished fibonacci of 10: 55<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u043e\u0442. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u044f \u0432\u0441\u0451 \u043f\u043e\u043a\u0430\u0437\u0430\u043b.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440.<\/p>\n<h2>\u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/h2>\n<h3>\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e<\/h3>\n<p>\u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u044f \u0434\u0435\u043b\u0430\u044e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0442\u043e \u0434\u0443\u043c\u0430\u044e \u043d\u0435 \u043e \u0442\u043e\u043c \u0447\u0442\u043e &#171;\u044f \u0443\u043c\u0435\u044e \u0438 \u043c\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u043a\u043e&#187; \u0430 &#171;\u044f \u0443\u043c\u0435\u044e \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e&#187; \u0438\u043b\u0438 &#171;\u044f \u043f\u0438\u0448\u0443 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u0430&#187;.<\/p>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0444\u0440\u0430\u0437\u0430 3. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u0438\u0448\u0443 <s>\u043f\u043e\u043b\u043d\u044b\u0439<\/s> \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u044f \u0441\u0442\u0430\u043b \u0441\u0440\u0430\u0437\u0443. \u0418 \u0441 \u043d\u0430\u0447\u0430\u043b\u043e \u044f \u043d\u0430\u0433\u043b\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043e\u0434 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u0410 \u043b\u0435\u043a\u0441\u0435\u0440 \u044f \u0432\u0437\u044f\u043b \u0438\u0437 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0438. \u0410 \u043d\u0430\u0447\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u044f \u0441 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u043e\u0441\u0442\u043e <code>a = 10;<\/code> \u043a\u0430\u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0412 \u0441\u043a\u043e\u0440\u043e\u043c \u044f \u043d\u0430\u0447\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0434\u0443\u043c\u0430\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u0430\u0448\u0438 return, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041d\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043d\u044f\u043b \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433\u0443 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0418 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u043e\u0440\u044b\u0432\u043e\u043c \u0432 \u043c\u043e\u0451\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u0441\u0442\u0430\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0447\u0442\u043e \u043b\u0438\u0431\u043e.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0441\u0434\u0435\u043b\u0430\u043b if-else \u0438 while. \u0421 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u044d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c. \u041a \u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u043d\u0430\u0447\u0430\u043b \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0441\u0442 \u043f\u0440\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c \u044f \u043d\u0430\u0447\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0430\u043b\u043e \u0441\u0430\u043c\u044b\u043c \u043b\u0435\u0433\u043a\u0438\u043c. \u041d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0448\u043b\u0430 \u043f\u043e\u0440\u0447\u0430 \u043a\u043e\u0434\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043d\u043e\u043c\u0435\u0440 1 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0421\u0432\u043e\u0435\u0433\u043e \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0438 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0441\u0442 \u043e \u0442\u043e\u043c \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u0440\u0435\u0448\u0430\u043b \u0431\u0430\u0433 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0434\u0435 int x = &#171;h&#187;; \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0441\u0435\u0431\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0441 \u044d\u0442\u0438\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0446\u0438\u043a\u043b do-while \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043d\u0430 \u0442\u0435\u0441\u0442\u0430\u0445.<\/p>\n<h3>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0438\u0434\u0435\u044f<\/h3>\n<p>\u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0451 \u0441 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e printf \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u0430\u0434\u0435\u0432\u0430\u044f \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u043e\u0432\u044b\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c.<\/p>\n<p>\u0414\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u043b, \u0434\u0443\u043c\u0430\u043b, \u0434\u0443\u043c\u0430\u043b&#8230; \u0418 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b!<\/p>\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u043d\u043e\u043c\u0435\u0440 1. \u0410 \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u043e\u0442\u043e\u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 (stdout).<\/p>\n<p>\u041a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0435\u0433\u043e? \u041f\u0440\u043e\u0441\u0442\u043e! \u0417\u0430\u0441\u0443\u043d\u0443\u043b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 &#8216;stdout&#8217; \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c &#8216; &#8216;.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 stdout \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0439\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0433\u043e eval.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0438 <s>\u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c<\/s> \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h3>\u0412\u0435\u043b\u0438\u043a\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0431\u0430\u0433\u043e\u0432, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u044f \u0447\u0443\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u043b \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442.<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0434\u0435\u044e \u0441 stdout \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0442\u0443\u0442 \u0436\u0435 \u043f\u043e\u0441\u044b\u043f\u0430\u043b\u0441\u044f.<\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u0441 \u043f\u043b\u044e\u0441\u043e\u043c, \u043e\u0448\u0438\u0431\u043a\u0430 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0438\u0433\u043d\u044f&#8230;<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u043c\u044b\u0441\u043b\u044c &#171;\u0443\u0434\u0430\u043b\u0438 \u044d\u0442\u043e&#187; \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u044f \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u043b \u043a\u043e\u043c\u043f \u0438 \u043f\u0440\u043e \u0441\u0435\u0431\u044f \u0441\u043a\u0430\u0437\u0430\u043b: &#171;\u044f \u043c\u043d\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e&#187;.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c \u0432\u0435\u0447\u0435\u0440\u043a\u043e\u043c \u044f \u0441\u043d\u043e\u0432\u0430 \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c. \u0418 \u044f \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043d\u0430\u0448\u0451\u043b \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b. \u0422\u0430\u043a \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f (\u043f\u043e\u043b\u0443) \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u044f \u043d\u0430\u0445\u043e\u0436\u0443 \u0431\u0430\u0433\u0438: \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e \u0441 \u043a\u0440\u0443\u0442\u044b\u043c \u043b\u0438\u0446\u043e\u043c \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0430\u0445\u043e\u0436\u0443 \u0431\u0430\u0433. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c. \u0412\u0440\u043e\u0434\u0435 \u0431\u044b\ud83d\ude05.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f. \u0422\u043e\u0442 \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u043b\u043e\u0434\u0435\u0446.<\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u043e\u043a\u0430!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/904548\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043d\u0430 github?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">66.67% <\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span><span class=\"tm-article-poll__answer-votes\">4<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 66.67%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">33.33% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span><span class=\"tm-article-poll__answer-votes\">2<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 33.33%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 6 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/904548\/\"> https:\/\/habr.com\/ru\/articles\/904548\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0436\u0435 \u0431\u044b\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0447\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u043e \u043d\u0435 &#171;\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C \u043d\u0430 Python&#187; \u0432\u0435\u0434\u044c \u043a\u043e\u0433\u0434\u0430 \u044f \u0434\u0435\u043b\u0430\u043b \u0435\u0433\u043e \u0442\u043e \u044f \u043d\u0435 \u0437\u043d\u0430\u043b \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C \u043d\u0430 Python.<\/p>\n<h2>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435<\/h2>\n<p>\u0412\u043e\u0442 \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b:<\/p>\n<ul>\n<li>\n<p>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 int \u0438 char (\u0432\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0431\u0430\u0433\u043e\u0432\u0430\u043d\u043d\u044b\u0439)<\/p>\n<\/li>\n<li>\n<p>\u041a\u0443\u0447\u0430 \u0446\u0438\u043a\u043b\u043e\u0432: do-while, while<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 if-else<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e void<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043a char \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 &#171;hello world&#187; \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u042d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b: +, -, \/, *, &lt;, &gt;, ==, !=<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0438\u043c\u044f = \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;)<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 (\u0442\u0438\u043f_\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043c\u044f = \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;)<\/p>\n<\/li>\n<li>\n<p>\u0410 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440&#8230; \u0415\u0449\u0451 \u043f\u043e\u0434\u0443\u043c\u0430\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>BNF \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0435. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043a\u0438\u0434\u0430\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">void fac(n) {   int f = 1;   while (n &gt; 1) {     f = f * n;     n = n - 1;   } }  void main() {   fac(5); }<\/code><\/pre>\n<p>\u041f\u0440\u0430\u0432\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0435 \u043a\u0430\u043a\u043e\u0433\u043e \u043a\u0440\u043e\u043c\u0435 <code>Execution finished<\/code>. \u041f\u043e\u0447\u0435\u043c\u0443? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0442\u043e \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e eval \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e stdout \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434, \u0442\u043e\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e. \u0412\u0441\u0435\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u0442\u0430\u043f\u0430:<\/p>\n<ol>\n<li>\n<p>\u041b\u0435\u043a\u0441\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0435\u0440 \u0441\u0442\u0440\u043e\u0438\u0442 AST<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h2>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0430 (printf):<\/p>\n<pre><code class=\"cpp\">void printf(mes) {   stdout = stdout + mes; }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u043f\u0430\u0439\u0442\u043e\u043d\u0430 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 mes. \u041d\u0443 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 stdout.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430:<\/p>\n<pre><code class=\"cpp\">void fac(n) {   int f = 1;   while (n &gt; 1) {     f = f * n;     n = n - 1;   } }<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0446 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <code>stdout = stdout + \"f\";<\/code> \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041d\u043e \u043f\u043e\u043a\u0430 \u043a\u0440\u043e\u043c\u0435 printf, \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0438 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0434\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0411\u043e\u043b\u0435\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0441\u0438\u043d\u0442\u0430\u0442\u0438\u043a\u0441 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 if-else. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 (\u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442):<\/p>\n<pre><code class=\"cpp\">if (\u0443\u0441\u043b\u043e\u0432\u0438\u0435) {   \/\/\u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 } \/\/\u0435\u0441\u043b\u0438 else \u043d\u0443\u0436\u0435\u043d else {   \/\/\u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c.<\/p>\n<p>\u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">void main() {   int x = 5;   if (x &lt; 10) {     x = 10;   }   else {     x = 5;   } }<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e x. \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c: \u043c\u0435\u043d\u044c\u0448\u0435 10? \u0422\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 10. \u0411\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u0441\u044f\u0442\u0438 \u0438\u043b\u0438 10? \u0411\u0443\u0434\u0435\u0442 5.<\/p>\n<p>\u0412\u0441\u0451 \u043b\u0435\u0433\u043a\u043e. \u0414\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c do-while. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<pre><code class=\"cpp\">do {   \/\/\u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 } while (\u0443\u0441\u043b\u043e\u0432\u0438\u0435);<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">void main() {   int a = 5;   do {     a = a - 1   } while (a &gt; 6); }<\/code><\/pre>\n<p>\u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c false. \u041d\u043e &#171;a&#187; \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 5 \u0430 4. \u0412 \u044d\u0442\u043e\u043c \u0432\u0435\u0441\u044c \u0441\u043c\u044b\u0441\u043b do-while.<\/p>\n<p>\u042f \u0434\u0443\u043c\u0430\u044e while \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0432\u0435\u0434\u044c \u044f \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0440\u0430\u043d\u0435\u0435.<\/p>\n<h2>\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 10:<\/p>\n<pre><code class=\"cpp\">\/\/\u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 void fib(n) {   int n1 = 1;   int n2 = 1;   int n3 = 1;   int count = n - 2;   while (count) {     n3 = n1 + n2;     n1 = n2;     n2 = n3;     count = count - 1;   } }  \/\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0430 void printf(mes) {   stdout = stdout + mes; }  \/\/\u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u044b void main() {   fib(10);   printf(\"'fibonacci of 10: '+str(n2)\"); }<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a. \u0418 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e while.<\/p>\n<p>\u0410 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<pre><code>Execution finished fibonacci of 10: 55<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u043e\u0442. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u044f \u0432\u0441\u0451 \u043f\u043e\u043a\u0430\u0437\u0430\u043b.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440.<\/p>\n<h2>\u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/h2>\n<h3>\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e<\/h3>\n<p>\u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u044f \u0434\u0435\u043b\u0430\u044e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0442\u043e \u0434\u0443\u043c\u0430\u044e \u043d\u0435 \u043e \u0442\u043e\u043c \u0447\u0442\u043e &#171;\u044f \u0443\u043c\u0435\u044e \u0438 \u043c\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u043a\u043e&#187; \u0430 &#171;\u044f \u0443\u043c\u0435\u044e \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e&#187; \u0438\u043b\u0438 &#171;\u044f \u043f\u0438\u0448\u0443 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u0430&#187;.<\/p>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0444\u0440\u0430\u0437\u0430 3. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u0438\u0448\u0443 <s>\u043f\u043e\u043b\u043d\u044b\u0439<\/s> \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u044f \u0441\u0442\u0430\u043b \u0441\u0440\u0430\u0437\u0443. \u0418 \u0441 \u043d\u0430\u0447\u0430\u043b\u043e \u044f \u043d\u0430\u0433\u043b\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043e\u0434 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u0410 \u043b\u0435\u043a\u0441\u0435\u0440 \u044f \u0432\u0437\u044f\u043b \u0438\u0437 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0438. \u0410 \u043d\u0430\u0447\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u044f \u0441 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u043e\u0441\u0442\u043e <code>a = 10;<\/code> \u043a\u0430\u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0412 \u0441\u043a\u043e\u0440\u043e\u043c \u044f \u043d\u0430\u0447\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0434\u0443\u043c\u0430\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u0430\u0448\u0438 return, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041d\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043d\u044f\u043b \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433\u0443 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0418 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u043e\u0440\u044b\u0432\u043e\u043c \u0432 \u043c\u043e\u0451\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u0441\u0442\u0430\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0447\u0442\u043e \u043b\u0438\u0431\u043e.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0441\u0434\u0435\u043b\u0430\u043b if-else \u0438 while. \u0421 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u044d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c. \u041a \u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u043d\u0430\u0447\u0430\u043b \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0441\u0442 \u043f\u0440\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c \u044f \u043d\u0430\u0447\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0430\u043b\u043e \u0441\u0430\u043c\u044b\u043c \u043b\u0435\u0433\u043a\u0438\u043c. \u041d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0448\u043b\u0430 \u043f\u043e\u0440\u0447\u0430 \u043a\u043e\u0434\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043d\u043e\u043c\u0435\u0440 1 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0421\u0432\u043e\u0435\u0433\u043e \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0438 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0441\u0442 \u043e \u0442\u043e\u043c \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u0440\u0435\u0448\u0430\u043b \u0431\u0430\u0433 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0434\u0435 int x = &#171;h&#187;; \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0441\u0435\u0431\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0441 \u044d\u0442\u0438\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0446\u0438\u043a\u043b do-while \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043d\u0430 \u0442\u0435\u0441\u0442\u0430\u0445.<\/p>\n<h3>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0438\u0434\u0435\u044f<\/h3>\n<p>\u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0451 \u0441 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e printf \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u0430\u0434\u0435\u0432\u0430\u044f \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u043e\u0432\u044b\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c.<\/p>\n<p>\u0414\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u043b, \u0434\u0443\u043c\u0430\u043b, \u0434\u0443\u043c\u0430\u043b&#8230; \u0418 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b!<\/p>\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u043d\u043e\u043c\u0435\u0440 1. \u0410 \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u043e\u0442\u043e\u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 (stdout).<\/p>\n<p>\u041a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0435\u0433\u043e? \u041f\u0440\u043e\u0441\u0442\u043e! \u0417\u0430\u0441\u0443\u043d\u0443\u043b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 &#8216;stdout&#8217; \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c &#8216; &#8216;.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 stdout \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0439\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0433\u043e eval.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0438 <s>\u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c<\/s> \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h3>\u0412\u0435\u043b\u0438\u043a\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0431\u0430\u0433\u043e\u0432, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u044f \u0447\u0443\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u043b \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442.<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0434\u0435\u044e \u0441 stdout \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0442\u0443\u0442 \u0436\u0435 \u043f\u043e\u0441\u044b\u043f\u0430\u043b\u0441\u044f.<\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u0441 \u043f\u043b\u044e\u0441\u043e\u043c, \u043e\u0448\u0438\u0431\u043a\u0430 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0438\u0433\u043d\u044f&#8230;<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u043c\u044b\u0441\u043b\u044c &#171;\u0443\u0434\u0430\u043b\u0438 \u044d\u0442\u043e&#187; \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u044f \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u043b \u043a\u043e\u043c\u043f \u0438 \u043f\u0440\u043e \u0441\u0435\u0431\u044f \u0441\u043a\u0430\u0437\u0430\u043b: &#171;\u044f \u043c\u043d\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e&#187;.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c \u0432\u0435\u0447\u0435\u0440\u043a\u043e\u043c \u044f \u0441\u043d\u043e\u0432\u0430 \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c. \u0418 \u044f \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043d\u0430\u0448\u0451\u043b \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b. \u0422\u0430\u043a \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f (\u043f\u043e\u043b\u0443) \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u044f \u043d\u0430\u0445\u043e\u0436\u0443 \u0431\u0430\u0433\u0438: \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e \u0441 \u043a\u0440\u0443\u0442\u044b\u043c \u043b\u0438\u0446\u043e\u043c \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0430\u0445\u043e\u0436\u0443 \u0431\u0430\u0433. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c. \u0412\u0440\u043e\u0434\u0435 \u0431\u044b\ud83d\ude05.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f. \u0422\u043e\u0442 \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u043b\u043e\u0434\u0435\u0446.<\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u043e\u043a\u0430!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/904548\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043d\u0430 github?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">66.67% <\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span><span class=\"tm-article-poll__answer-votes\">4<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 66.67%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">33.33% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span><span class=\"tm-article-poll__answer-votes\">2<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 33.33%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 6 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/904548\/\"> https:\/\/habr.com\/ru\/articles\/904548\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-457471","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=457471"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457471\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}