{"id":2256,"date":"2009-03-02T15:24:51","date_gmt":"2009-03-02T12:24:51","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=2256"},"modified":"2009-03-02T15:24:51","modified_gmt":"2009-03-02T12:24:51","slug":"%d0%b8%d1%81%d1%85%d0%be%d0%b4%d0%bd%d1%8b%d0%b9-%d1%82%d0%b5%d0%ba%d1%81%d1%82-%d0%bf%d1%80%d0%be%d0%b3%d1%80%d0%b0%d0%bc%d0%bc%d1%8b","status":"publish","type":"post","link":"https:\/\/studentpmr.ru\/?p=2256","title":{"rendered":"\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b"},"content":{"rendered":"<p>\/*   str6            *\/<br \/>\n\/*  \u0412\u044b\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0435\u043f\u043b\u0430  *\/<br \/>\n\/*  \u041c\u043e\u043b\u0434\u0430\u0432\u0438\u0437\u043e\u043b\u0438\u0442. \u0433.  \u0422\u0438\u0440\u0430\u0441\u043f\u043e\u043b\u044c  *\/<!--more--><\/p>\n<p>#include &lt;stdio.h&gt;<br \/>\n#include &lt;time.h&gt;<br \/>\n#include &lt;math.h&gt;<br \/>\n#include &lt;string.h&gt;<br \/>\n#include &lt;stdlib.h&gt;<br \/>\n#include &#171;titlet.h&#187;<br \/>\n#include &#171;d6.h&#187;<br \/>\n#define ANAL 1<\/p>\n<p>void d6(void);<br \/>\nvoid grafr();<br \/>\nfloat pp3();<br \/>\nvoid vxd1();<br \/>\nvoid vost1();<br \/>\nvoid ocinf();<br \/>\nvoid uchet();<br \/>\nvoid fdt();<br \/>\nvoid mes();<br \/>\nvoid sv();<br \/>\nvoid teplo();<br \/>\nlong lsee();<br \/>\nstruct zps mo6[]={<br \/>\n{&amp;d6,60,RAVR6,3,IVR6,IVD6,IVT6,&#187;mainnsi&#187;,&#187;d6&#8243;,0}<br \/>\n};<br \/>\n#include &#171;bibt.c&#187;<br \/>\n#include &#171;blog.c&#187;<br \/>\nchar far *tg = (char far *) 328;<\/p>\n<p>main(argc,argv)<br \/>\nint argc;<br \/>\nchar *argv[];<br \/>\n{<br \/>\nint prog,i,f1;<\/p>\n<p>static int *AIM6[4]={IVR6,IVD6,IVT6,NULL};<br \/>\nstatic int INT6[3]={60,60,60};<\/p>\n<p>*tg=&#8217;0&#8242;;<br \/>\nswitch(argc){<br \/>\ncase 7:<br \/>\npar5=atoi(argv[6]);<br \/>\ncase 6:<br \/>\npar4=atoi(argv[5]);<br \/>\ncase 5:<br \/>\ncase 4:<br \/>\notmn=atoi(argv[3]);<br \/>\ncase 3:<br \/>\npar1=atoi(argv[2]);<br \/>\ncase 2:<br \/>\nprog=atoi(argv[1]);<br \/>\n}<\/p>\n<p>vost1(GE,1);<\/p>\n<p>vost(GN6,K6);<br \/>\npinf(AIM6,INT6);<\/p>\n<p>\/***********************************\/<br \/>\n\/* \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u044d\u043d\u0442\u0430\u043b\u044c\u043f\u0438\u0438  *\/<\/p>\n<p>if((f1=_open(&#171;ental&#187;,4))==-1)<br \/>\n{<br \/>\nsprintf(buf_mes,&#187;%s: vost:\u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0442 \u0444\u0430\u0439\u043b %s&#187;,<br \/>\nname_prog,&#187;ental&#187;);<br \/>\nmes(buf_mes,1);<\/p>\n<p>}<\/p>\n<p>_read(f1,ent,sizeof(ent));<br \/>\n_close(f1);<\/p>\n<p>\/***********************************\/<\/p>\n<p>if(par1==4 || par1==3 )<br \/>\n{<br \/>\nset_data(IMR6, MPR6, KOLS6);<br \/>\nset_data1(IMD6, MPD6, KOLD6);<br \/>\nset_data1(IMT6, MPT6, KOLT6);<br \/>\nlogr(IMR6,MTPR6,FMTPR6,KOLS6,NEDR6,IVR6,RAVR6);<br \/>\nloga(IMD6,MTPD6,FMTPD6,KOLD6,NEDD6,IVD6);<br \/>\nloga(IMT6,MTPT6,FMTPT6,KOLT6,NEDT6,IVT6);<br \/>\n}<\/p>\n<p>PZAP(mo6,1,otmn,argv[4]);<\/p>\n<p>switch (prog){<br \/>\ncase 0:<br \/>\ncase 1:<br \/>\nif(*tg!=&#8217;0&#8242;) { *tg=&#8217;0&#8242;;exit(1);}<br \/>\n\/*printf(&#171;d6&#187;);*\/<br \/>\nset_data(IMR6, MPR6, KOLS6);<br \/>\nset_data1(IMD6, MPD6, KOLD6);<br \/>\nset_data1(IMT6, MPT6, KOLT6);<\/p>\n<p>if(par1==0 || (par1==3 &amp;&amp; par2==2))<br \/>\nlogr(IMR6,MTPR6,FMTPR6,KOLS6,NEDR6,IVR6,RAVR6);<\/p>\n<p>if(par1==0 || (par1==3 &amp;&amp; par2==2) ||<br \/>\n(par1==4 &amp;&amp; par2==2) || par1==2)<\/p>\n<p>{ loga(IMD6,MTPD6,FMTPD6,KOLD6,NEDD6,IVD6);<br \/>\nloga(IMT6,MTPT6,FMTPT6,KOLT6,NEDT6,IVT6);<br \/>\n}<\/p>\n<p>d6();<br \/>\ndefault: break;<br \/>\n}<br \/>\n\/*   printf(&#171;str6:end\\n&#187;);*\/<\/p>\n<p>exit(0);<br \/>\n}<\/p>\n<p>void sv()<br \/>\n{<br \/>\nstatic struct st GE[1]={{&#171;E&#187;,E,34}};<br \/>\nint kcyt,kcy1,s17,vrem,i;<br \/>\nstruct tm *p;<br \/>\nlong int t;<br \/>\ntime(&amp;t);<br \/>\np=localtime(&amp;t);<br \/>\nE[1]=p-&gt;tm_sec;<br \/>\nE[2]=p-&gt;tm_min;<br \/>\nE[3]=p-&gt;tm_hour;<br \/>\nE[4]=p-&gt;tm_yday+1;<br \/>\nE[5]=E[3]*60+E[2];<br \/>\nE[6]=p-&gt;tm_mday;<br \/>\nE[7]=p-&gt;tm_mon+1;<br \/>\nE[8]=p-&gt;tm_year%100;<br \/>\nE[10]=KCYTOK;<br \/>\nE[9]=minu(E[5]);<br \/>\nE[12]=KOLSM;<br \/>\nfor(i=0;i&lt;E[12];i++)<br \/>\nE[13+i]=KSM[i];<br \/>\nE[11]=ncm(E[5]);<br \/>\nvxd1(GE,1);<br \/>\n}<\/p>\n<p>\/*\t\t\t   d6.c   *\/<\/p>\n<p>void d6(void)<\/p>\n<p>{<br \/>\nint sr,i;<br \/>\nint RQ = 0;<\/p>\n<p>switch(par1){<br \/>\ncase 0:<\/p>\n<p>if(prov(IVR6,RAVR6,TRCR6)==1) break;<br \/>\nif(prov(IVR6,RAVQ6,TRCQ6)==1) break;<br \/>\nA6:<br \/>\nanal(RABD6,IMD6,LSID6,KOLD6,IVD6,RAVD6);<br \/>\nint1(IMD6,IVD6,LSID6,RAVD6,RABD6,REZD6,KOLD6,RAVR6,1,<br \/>\nFNSID6,NSID6);<\/p>\n<p>for(i=0; i&lt;4; i++)<br \/>\nIMT6[ SV_iis[i][2]] = IMT6[ SV_iis[i][1]] &#8212; (IMR6[ SV_iis[i][0]]\/TRCR6[0]);<\/p>\n<p>anal(RABT6,IMT6,LSIT6,KOLT6,IVT6,RAVT6);<br \/>\nint1(IMT6,IVT6,LSIT6,RAVT6,RABT6,REZT6,KOLT6,RAVR6,0);<\/p>\n<p>if(par1==4 &amp;&amp; par2==2) break;<br \/>\nif(par1==4 &amp;&amp; par2==1) goto U6;<\/p>\n<p>\/*  ****************************************************************<br \/>\n\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 TRCR6     *\/<\/p>\n<p>for(i=0; i&lt;KOLC6; i++)<br \/>\nTRCR6[i+1] = IMR6[i];<\/p>\n<p>\/*  ****************************************************************  *\/<\/p>\n<p>U6:<br \/>\nuchet(TRCR6, RABR6,KOLC6);<br \/>\nintrv(REZR6,RABR6,IVR6,RAVR6,KOLC6,SMR6,0,<br \/>\nNULL,NULL,0,&#187;0&#8243;,GOD6);<\/p>\n<p>if(par1==4 &amp;&amp; par2==1) goto UC1;<br \/>\nteplo(KOL_W,&amp;RQ,IMR6,LSIT6,TRSQ6,SV6_W,KFB);<br \/>\nteplo(KOL_D,&amp;RQ,IMR6,LSIT6,TRSQ6,SV6_D,KFD);<br \/>\nteplo(KOL_M,&amp;RQ,IMR6,LSIT6,TRSQ6,SV6_M,KFM);<br \/>\nental(LSID6,IMR6,TRSQ6,SEN6,KOL_P);<\/p>\n<p>\/*    ***********************************************************<\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044a\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 TRCQ6 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c<br \/>\n\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f            *\/<\/p>\n<p>TRCQ6[1]  =  TRSQ6[1] &#8212; TRSQ6[3];<br \/>\nTRCQ6[2]  =  TRSQ6[4] &#8212; TRSQ6[6];<br \/>\nTRCQ6[3]  =  TRSQ6[7] &#8212; TRSQ6[9];<br \/>\nTRCQ6[4]  =  TRSQ6[10] &#8212; TRSQ6[12];<br \/>\nTRCQ6[5]  =  TRSQ6[13] &#8212; TRSQ6[14];<br \/>\nTRCQ6[6]  =  TRSQ6[15] &#8212; TRSQ6[16];<br \/>\nTRCQ6[7]  =  TRSQ6[23] &#8212; TRSQ6[24];<br \/>\nTRCQ6[8]  =  TRSQ6[25] &#8212; TRSQ6[26];<br \/>\nTRCQ6[9]  =  TRSQ6[27] &#8212; TRSQ6[28];<br \/>\nTRCQ6[10] =  TRSQ6[29] &#8212; TRSQ6[30];<br \/>\nTRCQ6[11] =  TRSQ6[37] &#8212; TRSQ6[38];<br \/>\nTRCQ6[12] =  TRSQ6[39] &#8212; TRSQ6[40];<br \/>\nTRCQ6[13] =  TRSQ6[41] &#8212; TRSQ6[42];<\/p>\n<p>TRCQ6[15] =  TRSQ6[45] &#8212; TRSQ6[46];<br \/>\nTRCQ6[16] =  TRSQ6[49] &#8212; TRSQ6[50];<br \/>\nTRCQ6[17] =  TRSQ6[51] &#8212; TRSQ6[52];<br \/>\nTRCQ6[18] =  TRSQ6[53] &#8212; TRSQ6[54];<br \/>\nTRCQ6[19] =  TRSQ6[55] &#8212; TRSQ6[56];<br \/>\nTRCQ6[20] =  TRSQ6[57] &#8212; TRSQ6[58];<br \/>\nTRCQ6[21] =  TRSQ6[59] &#8212; TRSQ6[60];<br \/>\nTRCQ6[22] =  TRSQ6[61] &#8212; TRSQ6[62];<br \/>\nTRCQ6[23] =  TRSQ6[63];<br \/>\nTRCQ6[24] =  TRSQ6[64];<br \/>\nTRCQ6[25] =  TRSQ6[65];<br \/>\nTRCQ6[26] =  TRSQ6[66];<br \/>\nTRCQ6[27] =  TRSQ6[1] -TRSQ6[2];<br \/>\nTRCQ6[28] =  TRSQ6[4] -TRSQ6[5];<br \/>\nTRCQ6[29] =  TRSQ6[7] -TRSQ6[8];<br \/>\nTRCQ6[30] =  TRSQ6[10] -TRSQ6[11];<br \/>\nTRCQ6[31] =  TRSQ6[17] &#8212; TRSQ6[18];<br \/>\nTRCQ6[32] =  TRSQ6[19] &#8212; TRSQ6[20];<br \/>\nTRCQ6[33] =  TRSQ6[21] &#8212; TRSQ6[22];<br \/>\nTRCQ6[34] =  TRSQ6[43] &#8212; TRSQ6[44];<br \/>\nTRCQ6[35] =  TRSQ6[47] &#8212; TRSQ6[48];<br \/>\nTRCQ6[36] =  TRSQ6[31] &#8212; TRSQ6[32];<br \/>\nTRCQ6[37] =  TRSQ6[33] &#8212; TRSQ6[34];<br \/>\nTRCQ6[38] =  TRSQ6[35] &#8212; TRSQ6[36];<br \/>\nTRCQ6[41] =  TRSQ6[67];<br \/>\nTRCQ6[42] =  TRSQ6[68];<br \/>\nTRCQ6[43] =  TRSQ6[69];<br \/>\nTRCQ6[44] =  TRSQ6[70];<\/p>\n<p>TRCQ6[14] =  TRCQ6[33] &#8212; TRCQ6[34];<br \/>\nTRCQ6[39] =  TRCQ6[16] + TRCQ6[17] + TRCQ6[18];<br \/>\nTRCQ6[40] =  TRCQ6[19] + TRCQ6[20] + TRCQ6[21] + TRCQ6[22];<br \/>\nTRCQ6[45] =  TRCQ6[27] + TRCQ6[31];<br \/>\nTRCQ6[46] =  TRCQ6[28] + TRCQ6[29] + TRCQ6[30] + TRCQ6[32];<br \/>\nTRCQ6[47] =  TRCQ6[12] + TRCQ6[13] + TRCQ6[15] + TRCQ6[34];<br \/>\nTRCQ6[48] =  TRCQ6[16] + TRCQ6[17] + TRCQ6[18] + TRCQ6[33];<br \/>\nTRCQ6[48] += TRCQ6[35] + TRCQ6[37];<br \/>\nTRCQ6[49] =  TRCQ6[19] + TRCQ6[20] + TRCQ6[21] + TRCQ6[22];<br \/>\nTRCQ6[49] += TRCQ6[38];<br \/>\nTRCQ6[50] =  TRCQ6[11] + TRCQ6[12] + TRCQ6[13] + TRCQ6[14];<br \/>\nTRCQ6[50] += TRCQ6[16] + TRCQ6[17] + TRCQ6[18] + TRCQ6[19];<br \/>\nTRCQ6[50] += TRCQ6[20] + TRCQ6[21] + TRCQ6[22] + TRCQ6[27];<br \/>\nTRCQ6[50] += TRCQ6[28] + TRCQ6[29] + TRCQ6[30] + TRCQ6[31];<br \/>\nTRCQ6[50] += TRCQ6[32] + TRCQ6[33] + TRCQ6[34] + TRCQ6[35];<br \/>\nTRCQ6[50] += TRCQ6[36] + TRCQ6[37] + TRCQ6[38] + TRCQ6[41];<br \/>\nTRCQ6[50] += TRCQ6[42] + TRCQ6[43] + TRCQ6[44] ;<br \/>\nTRCQ6[51] =  TRCQ6[1 ] + TRCQ6[ 2] + TRCQ6[ 3] + TRCQ6[ 4];<br \/>\nTRCQ6[51] += TRCQ6[ 5] + TRCQ6[ 6] + TRCQ6[ 7] + TRCQ6[ 8];<br \/>\nTRCQ6[51] += TRCQ6[ 9] + TRCQ6[10] + TRCQ6[11] + TRCQ6[12];<br \/>\nTRCQ6[51] += TRCQ6[13] + TRCQ6[14] + TRCQ6[16] + TRCQ6[17];<br \/>\nTRCQ6[51] += TRCQ6[18] + TRCQ6[19] + TRCQ6[20] + TRCQ6[21];<br \/>\nTRCQ6[51] += TRCQ6[22] + TRCQ6[23] + TRCQ6[24] + TRCQ6[25];<br \/>\nTRCQ6[51] += TRCQ6[26] + TRCQ6[34] + TRCQ6[35];<br \/>\n\/*    ************************************************************  *\/<\/p>\n<p>UC1:<br \/>\nuchet(TRCQ6,RABQ6,KOLCQ6);<br \/>\ngrafr(GQ6,RAVR6,KOLNQ6);<br \/>\nintrv(REZQ6,RABQ6,IVR6,RAVQ6,KOLCQ6,SMQ6,1,<br \/>\nGQ6,SOTQ6,KOLNQ6,FNSIQ6,GODQ6);<br \/>\nvihod(IVR6,RAVR6,1,TRSR6,TRCR6,KOLC6,IMR6,KOLS6);<br \/>\nvihod(IVR6,RAVQ6,0,TRSQ6,TRCQ6,KOLCQ6);<br \/>\nvxd(GN6,K6);<br \/>\nbreak;<br \/>\ncase 1:<br \/>\nrasg(FNSIQ6,REZQ6,GQ6,IVR6,RAVQ6,KOLNQ6,0,SOTQ6,KOLCQ6,<br \/>\nSMQ6,0);<br \/>\nvxd(GN6,K6);<br \/>\nbreak;<br \/>\ncase 2:<br \/>\nvost1(GND6,KD6);<br \/>\npusk(REZQ6,SMQ6,RAVQ6,0,IVR6,IMR6,KOLCQ6,KOLS6,1,<br \/>\nFNSIQ6,GQ6,KOLNQ6,SOTQ6,GODQ6);<br \/>\npusk(REZR6,SMR6,RAVR6,1,IVR6,IMR6,KOLC6,KOLS6,0,<br \/>\n&#171;0&#187;,NULL,0,NULL,GOD6);<br \/>\npuska(REZD6,IVD6,IMD6,RAVD6,LSID6,KOLD6,RAVR6,1,<br \/>\nFNSID6,NSID6);<br \/>\npuska(REZT6,IVT6,IMT6,RAVT6,LSIT6,KOLT6,RAVR6,0);<br \/>\nvxd(GN6,K6);<br \/>\nbreak;<br \/>\ncase 3:<br \/>\nTRCQ6[0]=pp3(par4,par3,RAVQ6);<br \/>\nif(datch(IVR6,RAVR6,TRCR6,TRS,IMR6,KOLS6)==1)  break;<br \/>\ngoto A6;<\/p>\n<p>case 4:<br \/>\nif((sr=sredn(TRCQ6,IVR6,RAVQ6,REZQ6,KOLCQ6))==1) break;<br \/>\nif((sr=sredn(TRCR6,IVR6,RAVR6,REZR6,KOLC6))==1) break;<br \/>\nif(sr==2) goto U6;<br \/>\nocinf(IVR6,IMR6,KOLS6);<br \/>\ngoto A6;<br \/>\ncase 6:<br \/>\nkorag(REZD6,FNSID6,RAVD6,NSID6,KOLD6);<br \/>\nvost1(GND6,KD6);<br \/>\nvxd(GN6,K6);<br \/>\n}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* str6 *\/ \/* \u0412\u044b\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0435\u043f\u043b\u0430 *\/ \/* \u041c\u043e\u043b\u0434\u0430\u0432\u0438\u0437\u043e\u043b\u0438\u0442. \u0433. \u0422\u0438\u0440\u0430\u0441\u043f\u043e\u043b\u044c *\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"_links":{"self":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/2256"}],"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=2256"}],"version-history":[{"count":1,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/2256\/revisions"}],"predecessor-version":[{"id":2257,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/2256\/revisions\/2257"}],"wp:attachment":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}