{"id":23826,"date":"2012-12-14T14:49:50","date_gmt":"2012-12-14T11:49:50","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=23826"},"modified":"2015-07-15T01:01:12","modified_gmt":"2015-07-14T22:01:12","slug":"%d1%81%d0%ba%d0%b0%d1%87%d0%b0%d1%82%d1%8c-%d0%bb%d0%b5%d0%ba%d1%86%d0%b8%d0%b8-%d0%bf%d0%be-%d1%81%d0%b8%d0%b0%d0%be%d0%b4","status":"publish","type":"post","link":"https:\/\/studentpmr.ru\/?p=23826","title":{"rendered":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u043e \u0421\u0438\u0410\u041e\u0414"},"content":{"rendered":"<p>\u0421\u0438\u0410\u041e\u0414_\u0442\u0435\u043e\u0440\u0438\u044f_\u041c\u041a\u21161 (\u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u043e \u0421\u0438\u0410\u041e\u0414 \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 \u0431\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438). \u041b\u0435\u043a\u0446\u0438\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0432\u043e\u0440\u0434\u0430.<\/p>\n<p><div class='afi-document'><div class='afi-document-icon'><a href='http:\/\/studentpmr.ru\/foto\/2012\/12\/\u0421\u0438\u0410\u041e\u0414-\u0442\u0435\u043e\u0440\u0438\u044f-\u043b\u0435\u043a\u0446\u0438\u0438-\u041c\u041a\u21161.doc'><img src='http:\/\/studentpmr.ru\/wp-content\/plugins\/attachment-file-icons\/mime\/doc-icon.png'\/><\/a><\/div><div class='afi-document-link'><a href=\"http:\/\/studentpmr.ru\/foto\/2012\/12\/\u0421\u0438\u0410\u041e\u0414-\u0442\u0435\u043e\u0440\u0438\u044f-\u043b\u0435\u043a\u0446\u0438\u0438-\u041c\u041a\u21161.doc\">\u0421\u0438\u0410\u041e\u0414 \u0442\u0435\u043e\u0440\u0438\u044f \u043b\u0435\u043a\u0446\u0438\u0438 \u041c\u041a\u21161<\/a><\/div><\/div><div class='afi-clear'><\/div><\/p>\n<p><div class='afi-document'><div class='afi-document-icon'><a href='http:\/\/studentpmr.ru\/foto\/2012\/12\/\u041b\u0435\u043a\u0446\u0438\u0438-\u043f\u043e-\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c-\u0438-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438-\u0434\u0430\u043d\u043d\u044b\u0445-\u0421\u0438\u0410\u041e\u0414.-\u041c\u043e\u0434\u0443\u043b\u044c-3..doc'><img src='http:\/\/studentpmr.ru\/wp-content\/plugins\/attachment-file-icons\/mime\/doc-icon.png'\/><\/a><\/div><div class='afi-document-link'><a href=\"http:\/\/studentpmr.ru\/foto\/2012\/12\/\u041b\u0435\u043a\u0446\u0438\u0438-\u043f\u043e-\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c-\u0438-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438-\u0434\u0430\u043d\u043d\u044b\u0445-\u0421\u0438\u0410\u041e\u0414.-\u041c\u043e\u0434\u0443\u043b\u044c-3..doc\">\u041b\u0435\u043a\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0438\u0410\u041e\u0414). \u041c\u043e\u0434\u0443\u043b\u044c 3.<\/a><\/div><\/div><div class='afi-clear'><\/div><\/p>\n<p><div class='afi-document'><div class='afi-document-icon'><a href='http:\/\/studentpmr.ru\/foto\/2012\/12\/\u041d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b.doc'><img src='http:\/\/studentpmr.ru\/wp-content\/plugins\/attachment-file-icons\/mime\/doc-icon.png'\/><\/a><\/div><div class='afi-document-link'><a href=\"http:\/\/studentpmr.ru\/foto\/2012\/12\/\u041d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b.doc\">\u041d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b<\/a><\/div><\/div><div class='afi-clear'><\/div><\/p>\n<p><div class='afi-document'><div class='afi-document-icon'><a href='http:\/\/studentpmr.ru\/foto\/2012\/12\/\u0411\u0438\u043d\u0430\u0440\u043d\u043e\u0435-\u0434\u0435\u0440\u0435\u0432\u043e-\u0421\u0438\u0410\u041e\u0414.doc'><img src='http:\/\/studentpmr.ru\/wp-content\/plugins\/attachment-file-icons\/mime\/doc-icon.png'\/><\/a><\/div><div class='afi-document-link'><a href=\"http:\/\/studentpmr.ru\/foto\/2012\/12\/\u0411\u0438\u043d\u0430\u0440\u043d\u043e\u0435-\u0434\u0435\u0440\u0435\u0432\u043e-\u0421\u0438\u0410\u041e\u0414.doc\">\u0411\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e &#8212; \u0421\u0438\u0410\u041e\u0414<\/a><\/div><\/div><div class='afi-clear'><\/div><\/p>\n<p><div class='afi-document'><div class='afi-document-icon'><a href='http:\/\/studentpmr.ru\/foto\/2012\/12\/\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439-\u0421\u0438\u0410\u041e\u0414.doc'><img src='http:\/\/studentpmr.ru\/wp-content\/plugins\/attachment-file-icons\/mime\/doc-icon.png'\/><\/a><\/div><div class='afi-document-link'><a href=\"http:\/\/studentpmr.ru\/foto\/2012\/12\/\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439-\u0421\u0438\u0410\u041e\u0414.doc\">\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 &#8212; \u0421\u0438\u0410\u041e\u0414<\/a><\/div><\/div><div class='afi-clear'><\/div><\/p>\n<p><!--more--><\/p>\n<p>\/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c \u0434\u0435\u0440\u0435\u0432\u043e\u043c<\/p>\n<p>#include &lt;stdio.h&gt;<\/p>\n<p>#include &lt;conio.h&gt;<\/p>\n<p>#include &lt;string.h&gt;<\/p>\n<p>struct TelNum;<\/p>\n<p>void printtreepre(TelNum * ); \u00a0 \u00a0\/\/\u043e\u0431\u0445\u043e\u0434 \u0441 \u043a\u043e\u0440\u043d\u044f \u0434\u0435\u0440\u0435\u0432\u0430, \u043b\u0435\u0432\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u043e, \u043f\u0440\u0430\u0432\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u043e<\/p>\n<p>void printtreein(TelNum * ); \u00a0\/\/\u043e\u0431\u0445\u043e\u0434 \u0441 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043f\u0440\u0430\u0432\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u043e,\u043a\u043e\u0440\u0435\u043d\u044c, \u043b\u0435\u0432\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u043e<\/p>\n<p>void printtreepost(TelNum * ); \/\/\u043e\u0431\u0445\u043e\u0434 \u0441 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043b\u0435\u0432\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u043e, \u043f\u0440\u0430\u0432\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u043e,\u043a\u043e\u0440\u0435\u043d\u044c<\/p>\n<p>int inputData(TelNum * );<\/p>\n<p>TelNum * addtree(TelNum *, TelNum *);<\/p>\n<p>struct TelNum<\/p>\n<p>{<\/p>\n<p>TelNum * left, *right;<\/p>\n<p>long number;<\/p>\n<p>char name[30];<\/p>\n<p>};<\/p>\n<p>\/\/\u00a0\u00a0\u00a0 \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435: \u043f\u0435\u0447\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0430<\/p>\n<p>void printtreepre(TelNum * root)<\/p>\n<p>{<\/p>\n<p>if(!root) return;<\/p>\n<p>if(root-&gt;number)<\/p>\n<p>printf(&#171;\u043d\u043e\u043c\u0435\u0440 %7li \u0444\u0430\u043c\u0438\u043b\u0438\u044f\u00a0 %s\\n&#187;,root-&gt;number,root-&gt;name);<\/p>\n<p>printtreepre(root-&gt;left);<\/p>\n<p>printtreepre(root-&gt;right);<\/p>\n<p>}<\/p>\n<p>void printtreein(TelNum * root)<\/p>\n<p>{<\/p>\n<p>if(!root) return;<\/p>\n<p>if(root-&gt;number)<\/p>\n<p>printtreein(root-&gt;left);<\/p>\n<p>printf(&#171;\u043d\u043e\u043c\u0435\u0440 %7li \u0444\u0430\u043c\u0438\u043b\u0438\u044f\u00a0 %s\\n&#187;,root-&gt;number,root-&gt;name);<\/p>\n<p>printtreein(root-&gt;right);<\/p>\n<p>}<\/p>\n<p>void printtreepost(TelNum * root)<\/p>\n<p>{<\/p>\n<p>if(!root) return;<\/p>\n<p>if(root-&gt;number)<\/p>\n<p>printtreepost(root-&gt;left);<\/p>\n<p>printtreepost(root-&gt;right);<\/p>\n<p>printf(&#171;\u043d\u043e\u043c\u0435\u0440 %7li \u0444\u0430\u043c\u0438\u043b\u0438\u044f\u00a0 %s\\n&#187;,root-&gt;number,root-&gt;name);<\/p>\n<p>}<\/p>\n<p>\/\/\u00a0\u00a0\u00a0 \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435: \u0432\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<p>int inputData(TelNum * n)<\/p>\n<p>{<\/p>\n<p>printf(&#171;\u041d\u043e\u043c\u0435\u0440?&#187;); scanf(&#171;%7li&#187;,&amp;n-&gt;number);<\/p>\n<p>if(!n-&gt;number) return 1;<\/p>\n<p>printf(&#171;\u0418\u043c\u044f?\u00a0 &#171;); scanf(&#171;%30s&#187;,&amp;n-&gt;name);<\/p>\n<p>return 0;<\/p>\n<p>}<\/p>\n<p>\/\/\u00a0\u00a0 \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 \u043a \u0434\u0435\u0440\u0435\u0432\u0443<\/p>\n<p>TelNum * addtree(TelNum *root, TelNum *temp) {<\/p>\n<p>if(root==NULL) {\u00a0\u00a0 \/\/\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 \u0432 \u0432\u0435\u0440\u0448\u0438\u043d\u0443 \u0434\u0435\u0440\u0435\u0432\u0430<\/p>\n<p>TelNum * root = new TelNum;<\/p>\n<p>root-&gt;number=temp-&gt;number;<\/p>\n<p>strcpy(root-&gt;name,temp-&gt;name);<\/p>\n<p>root-&gt;left=NULL;<\/p>\n<p>root-&gt;right=NULL;<\/p>\n<p>return root;<\/p>\n<p>}<\/p>\n<p>else {<\/p>\n<p>if(root-&gt;number&gt;temp-&gt;number)<\/p>\n<p>root-&gt;left=addtree(root-&gt;left,temp);<\/p>\n<p>else\u00a0\u00a0\u00a0\u00a0\u00a0 root-&gt;right=addtree(root-&gt;right,temp);<\/p>\n<p>}<\/p>\n<p>return root;<\/p>\n<p>}<\/p>\n<p>void main(void)<\/p>\n<p>{<\/p>\n<p>TelNum * start = NULL; \/\/\u0441\u0442\u043e\u0440\u043e\u0436<\/p>\n<p>TelNum * temp = new TelNum;<\/p>\n<p>do{\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u0431\u043b\u043e\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/p>\n<p>if(inputData(temp))<\/p>\n<p>{delete temp;<\/p>\n<p>break;<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>start=addtree(start,temp);<\/p>\n<p>}while(1);<\/p>\n<p>printtreepre(start);\u00a0 \/\/ebcahgi \u043f\u0440\u044f\u043c\u043e\u0439 \u043e\u0431\u0445\u043e\u0434<\/p>\n<p>getch();<\/p>\n<p>printtreein(start);\u00a0\u00a0 \/\/ighebca \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043e\u0431\u0445\u043e\u0434<\/p>\n<p>getch();<\/p>\n<p>printtreepost(start); \/\/acbighe \u043a\u043e\u043d\u0446\u0435\u0432\u043e\u0439 \u043e\u0431\u0445\u043e\u0434<\/p>\n<p>getch();<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0438\u0410\u041e\u0414_\u0442\u0435\u043e\u0440\u0438\u044f_\u041c\u041a\u21161 (\u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u043e \u0421\u0438\u0410\u041e\u0414 \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 \u0431\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438). \u041b\u0435\u043a\u0446\u0438\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0432\u043e\u0440\u0434\u0430. \u0421\u0438\u0410\u041e\u0414 \u0442\u0435\u043e\u0440\u0438\u044f \u043b\u0435\u043a\u0446\u0438\u0438 \u041c\u041a\u21161 \u041b\u0435\u043a\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0438\u0410\u041e\u0414). \u041c\u043e\u0434\u0443\u043b\u044c 3. \u041d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0411\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e &#8212; \u0421\u0438\u0410\u041e\u0414 \u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 &#8212; \u0421\u0438\u0410\u041e\u0414<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"_links":{"self":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23826"}],"collection":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23826"}],"version-history":[{"count":6,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23826\/revisions"}],"predecessor-version":[{"id":24586,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23826\/revisions\/24586"}],"wp:attachment":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}