{"id":23639,"date":"2012-11-29T14:49:15","date_gmt":"2012-11-29T11:49:15","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=23639"},"modified":"2012-11-29T14:51:58","modified_gmt":"2012-11-29T11:51:58","slug":"%d0%b3%d1%80%d0%b0%d1%84%d0%b8%d0%ba%d0%b0-%d0%bd%d0%b0-%d1%81%d0%b8-%d1%88%d0%b5%d1%81%d1%82%d0%b8%d1%83%d0%b3%d0%be%d0%bb%d1%8c%d0%bd%d0%b8%d0%ba","status":"publish","type":"post","link":"https:\/\/studentpmr.ru\/?p=23639","title":{"rendered":"\u0413\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0421\u0438 ++. \u0428\u0435\u0441\u0442\u0438\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a. \u041a\u043e\u0440\u0430\u0431\u043b\u0438\u043a. \u041a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a\u0438. \u041a\u0440\u0443\u0433\u0438."},"content":{"rendered":"<p>\u0428\u0435\u0441\u0442\u0438\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a.<br \/>\n# include <stdio.h><br \/>\n# include <conio.h><br \/>\n# include <graphics.h><br \/>\n# include <math.h><br \/>\n# define PATH &#171;d:\\\\work\\\\borlandc\\\\bin\\\\&#187;<\/p>\n<p>void xxx (int x, int y, int a)<br \/>\n{<br \/>\nsetcolor (10) ;<br \/>\nline (x,y,x+a*sqrt(3)\/2,y-a\/2);<br \/>\nline (x+a*sqrt(3)\/2,y-a\/2,x+a*sqrt(3),y);<br \/>\nline (x+a*sqrt(3),y,x+a*sqrt(3),y+a);<br \/>\nline (x+a*sqrt(3),y+a,x+a*sqrt(3)\/2,y+3*a\/2);<br \/>\nline (x+a*sqrt(3)\/2,y+3*a\/2,x,y+a);<br \/>\nline (x,y+a,x,y);<br \/>\n}<br \/>\n<!--more--><br \/>\nvoid main(void)<br \/>\n{ int gdriver=DETECT;<br \/>\nint gmode;<br \/>\nint errorcode;<br \/>\ninitgraph(&#038;gdriver,&#038;gmode,PATH);<br \/>\nerrorcode=graphresult();<br \/>\n if(errorcode!=grOk)<br \/>\n {<br \/>\n  printf(&#171;Error%d\\n&#187;,errorcode);<br \/>\n  puts(&#171;Press <Enter> for quit&#187;);<br \/>\n  getch();<br \/>\n  return;<br \/>\n  }<\/p>\n<p>int a ;<br \/>\nprintf (&#171;Vvedite dliny storoni \\n&#187;) ;<br \/>\nscanf (&#171;%d&#187;, &#038;a) ;<br \/>\nxxx (280,200, a) ;<br \/>\ngetch () ;<br \/>\nclosegraph() ;<br \/>\n}<\/p>\n<p>\u041a\u043e\u0440\u0430\u0431\u043b\u0438\u043a.<\/p>\n<p>#include<stdio.h><br \/>\n#include<graphics.h><br \/>\n#include<conio.h><\/p>\n<p>#define PATH&#187;d:\\\\work\\\\borlandc\\\\bin\\\\&#187;<br \/>\nvoid korablik(int x,int y)<br \/>\n{ int k1[10];int k2[8];<br \/>\n  k1[0]=x;k1[1]=y;<br \/>\n  k1[2]=x+150;k1[3]=y;<br \/>\n  k1[4]=x+120;k1[5]=y+30;<br \/>\n  k1[6]=x+30;k1[7]=y+30;<br \/>\n  k1[8]=x;k1[9]=y;<br \/>\n  setfillstyle(HATCH_FILL,1);<br \/>\n  setcolor(1);<br \/>\n  fillpoly(5,k1);<br \/>\n  k2[0]=x+70;k2[1]=y-60;<br \/>\n  k2[2]=x+90;k2[3]=y-50;<br \/>\n  k2[4]=x+70;k2[5]=y-40;<br \/>\n  k2[6]=x+70;k2[7]=y-60;<br \/>\n  setfillstyle(XHATCH_FILL,4);<br \/>\n  setcolor(4);<br \/>\n  fillpoly(4,k2);<br \/>\n  line(x+40,y-10,x+70,y-40);<br \/>\n  line(x+70,y-40,x+100,y-10);<br \/>\n  line(x+100,y-10,x+40,y-10);<br \/>\n  line(x+70,y-40,x+70,y);<br \/>\n  }<br \/>\n  void main(void)<br \/>\n  { int gdriver=DETECT;<br \/>\nint gmode;<br \/>\nint errorcode;<br \/>\ninitgraph(&#038;gdriver,&#038;gmode,PATH);<br \/>\nerrorcode=graphresult();<br \/>\n if(errorcode!=grOk)<br \/>\n {<br \/>\n  printf(&#171;\u040b\u0438\u0401\u040e\u0404\u00a0:%d\\n&#187;,errorcode);<br \/>\n  puts(&#171;\u201e\u00ab\u043f \u00a7\u00a0\u045e\u0490\u0430\u0438\u0490\u00ad\u0401\u043f \u0407\u0430\u00ae\u0408\u0430\u00a0\u00ac\u00ac\u043b \u00ad\u00a0\u00a6\u00ac\u0401\u0432\u0490 <Enter>&#171;);<br \/>\n  getch();<br \/>\n  return;<br \/>\n  }<br \/>\n  korablik(70,140);<br \/>\n  getch();<br \/>\n  closegraph();<br \/>\n}<\/p>\n<p>\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u044b.<br \/>\n# include <stdio.h><br \/>\n# include <conio.h><br \/>\n# include <graphics.h><br \/>\n# include <stdlib.h><br \/>\n# define PATH &#171;d:\\\\work\\\\borlandc\\\\bin\\\\&#187;<br \/>\nvoid main(void)<\/p>\n<p>{ int gdriver=DETECT;<br \/>\nint gmode;<br \/>\nint errorcode;<br \/>\ninitgraph(&#038;gdriver,&#038;gmode,PATH);<br \/>\nerrorcode=graphresult();<br \/>\n if(errorcode!=grOk)<br \/>\n {<br \/>\n  printf(&#171;Error%d\\n&#187;,errorcode);<br \/>\n  puts(&#171;Press <Enter> for quit&#187;);<br \/>\n  getch();<br \/>\n  return;<br \/>\n  }<\/p>\n<p>int d, k, z, x, y ;<br \/>\nprintf (&#171;Vvedite koli4estvo kvadratov \\n&#187;) ;<br \/>\nscanf (&#171;%d&#187;, &#038;k) ;<br \/>\nz = k ;<br \/>\nprintf (&#171;Vvedite rasstoyanie mezdy kvadratami \\n&#187;) ;<br \/>\nscanf (&#171;%d&#187;, &#038;d) ;<br \/>\nprintf (&#171;Vvedite koordinati na4ala \\n&#187;) ;<br \/>\nscanf (&#171;%d%d&#187;, &#038;x, &#038;y) ;<br \/>\nrandomize () ;<br \/>\nfor (k=0; k<z; k++)\n\t{\n\tsetcolor(random(15)+1);\n\trectangle (x+k*d, y+k*d, x+2*z*d-d*k, y+2*z*d-d*k) ;\n\t}\n\ngetch () ;\nclosegraph () ;\n}\n\n\u0414\u0432\u0438\u0433\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u0440\u0443\u0433.\n# include <stdio.h><br \/>\n# include <conio.h><br \/>\n# include <graphics.h><br \/>\n# include <dos.h><br \/>\n# define PATH &#171;d:\\\\work\\\\borlandc\\\\bin\\\\&#187;<\/p>\n<p>void okr (int x, int y, int r, int c)<\/p>\n<p>{<br \/>\nsetcolor (c) ;<br \/>\ncircle (x, y, r) ;<br \/>\n}<br \/>\nvoid main ()<br \/>\n{<br \/>\nint x, y ;<br \/>\nint r = 10 ;<br \/>\n# define dt 50<br \/>\n# define dx 5<br \/>\nint maxy ;<br \/>\nint maxx ;<br \/>\nint gdriver = DETECT ;<br \/>\nint gmode ;<br \/>\nint errorcode ;<br \/>\ninitgraph (&#038;gdriver, &#038;gmode, PATH) ;<br \/>\nerrorcode = graphresult () ;<br \/>\nif (errorcode==grOk)<br \/>\n\t{<br \/>\n\tx = 20 ;<br \/>\n\ty = 20 ;<br \/>\n\tmaxy = getmaxy()-10 ;<br \/>\n\tmaxx = getmaxx()-10 ;<br \/>\n\twhile (y<maxy)\n\t\t{\n\t\tokr (x, y, r, RED) ;\n\t\tdelay(dt) ;\n\t\tokr (x, y, r, BLACK) ;\n\t\ty+=dx ;\n\t\t}\n\t\twhile (x<maxx &#038;&#038; y>20 )<br \/>\n\t\t\t{<br \/>\n\t\t\tokr (x, y, r, RED) ;<br \/>\n\t\t\tdelay(dt) ;<br \/>\n\t\t\tokr (x, y, r, BLACK) ;<br \/>\n\t\t\tx+=dx ;<br \/>\n\t\t\ty-=dx ;<br \/>\n                        }<br \/>\n\tclosegraph() ;<br \/>\n\t}<br \/>\nelse<br \/>\n\t{<br \/>\n\tprintf (&#171;Error %d\\n&#187;, errorcode) ;<br \/>\n\tputs (&#171;Press <Enter> for quit&#187;) ;<br \/>\n\tgetch () ;<br \/>\n\t}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0428\u0435\u0441\u0442\u0438\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a. # include # include # include # include # define PATH &#171;d:\\\\work\\\\borlandc\\\\bin\\\\&#187; void xxx (int x, int y, int a) { setcolor (10) ; line (x,y,x+a*sqrt(3)\/2,y-a\/2); line (x+a*sqrt(3)\/2,y-a\/2,x+a*sqrt(3),y); line (x+a*sqrt(3),y,x+a*sqrt(3),y+a); line (x+a*sqrt(3),y+a,x+a*sqrt(3)\/2,y+3*a\/2); line (x+a*sqrt(3)\/2,y+3*a\/2,x,y+a); line (x,y+a,x,y); }<\/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\/23639"}],"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=23639"}],"version-history":[{"count":4,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23639\/revisions"}],"predecessor-version":[{"id":23642,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23639\/revisions\/23642"}],"wp:attachment":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}