{"id":22,"date":"2007-12-04T19:19:09","date_gmt":"2007-12-04T19:19:09","guid":{"rendered":"http:\/\/pblog.ru\/lab\/?p=30"},"modified":"2007-12-04T19:19:09","modified_gmt":"2007-12-04T19:19:09","slug":"games204","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=22","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430"},"content":{"rendered":"<p>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a?<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>uses crt;\ntype element = record\n        data:real;\n        next:pointer;\n        end;\nvar\npre,curr,head:^element;\nn:integer;\nfound:boolean;\nt:real;\nlabel m0,m1,m2,m3,m4;\nbegin\nhead:=nil;\nm0:\nclrscr;\nwriteln('1. \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442');\nwriteln('2. \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442');\nwriteln('3. \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b');\nwriteln('4. \u0412\u044b\u0445\u043e\u0434');\nreadln(n);\ncase n of\n1:goto m1;\n2:goto m2;\n3:goto m3;\nelse goto m4;\nend;\n{\u0414\u041e\u0411\u0410\u0412\u041b\u0415\u041d\u0418\u0415}\nm1:\nclrscr;\nwrite('\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043b\u043e: ');\nreadln(t);\nnew(curr);\ncurr^.data:=t;\ncurr^.next:=head;\nhead:=curr;\ngoto m0;\n\n{\u0423\u0414\u0410\u041b\u0415\u041d\u0418\u0415}\nm2:\nclrscr;\nif head=nil then\n             begin\n             writeln('\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0441\u0442\u043e\u0439!');\n             goto m0;\n             end;\ncurr:=head;\npre:=nil;\nfound:=false;\nwrite('\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0434\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c: ');\nreadln(t);\nwhile (curr <> nil) and (not found) do\n begin\n  if curr^.data=t then found:=true\n                  else\n                   begin\n                   pre:=curr;\n                   curr:=curr^.next;\n                   end;\n end;\nif found then\n          begin\n          if pre = nil then head:=curr^.next   {\u0435\u0441\u043b\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 - \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439}\n                       else pre^.next:=curr^.next;\n          dispose(curr);\n          write('\u042d\u043b\u0435\u043c\u0435\u043d\u0442 ',t:6:3,' \u0443\u0434\u0430\u043b\u0451\u043d \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430!');\n          readln;\n          end\n         else\n          begin\n          write('\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 ',t:6:3,' \u043d\u0435\u0442 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435!');\n          readln;\n          end;\ngoto m0;\n\n{\u0412\u042b\u0412\u041e\u0414 \u0412\u0421\u0415\u0413\u041e \u041d\u0410 \u042d\u041a\u0420\u0410\u041d}\nm3:\nclrscr;\ncurr:=head;\nwhile curr<>nil do\n begin\n writeln(curr^.data:6:3);\n curr:=curr^.next;\n end;\n readln;\ngoto m0;\nm4:\nif head<>nil then\n begin\n curr:=head;\n curr:=curr^.next;\n while curr<>nil do\n  begin\n  head^.next:=curr^.next;\n  dispose(curr);\n  curr:=head^.next;\n  end;\n dispose(head);\n end;\nhalt;\nend.\n<\/div><\/pre>\n<p><a href=\"http:\/\/www.programmersforum.ru\/member.php?u=5\">zetrix<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a?<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18,364],"tags":[216,270,322,325],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/22"}],"collection":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}