ΠΠ΅ΡΠ΅Π²ΠΎΠ΄ ΠΏ.2 ΠΊ ΠΏ9, Π±Π°Π·ΠΈΡΡ Β«Π-ΠΠΒ»
Unsigned length (char *str). If (x1&&!x2) cout<<" Z3β³; If (S2 & !R2 & !Q2) Qt2 = 1; If (S1 & !R1 & !Q1) Qt1 = 1; If (!y1&&!y2) cout<<" 1β³; If (!x1&&x2) cout<<" Z2β³; If (y1&&!y2) cout<<" 3β³; If (x1&&x2) cout<<" Z4β³; If (!y1&&y2) cout<<" 2β³; If (!S2 & R2 & Q2) Qt2 = 0; If (!S1 & R1 & Q1) Qt1 = 0; ΠΠΎΠ΄ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ: If (y1&&y2) cout<<" 4β³; Gotoxy (70, i+y+1); cout<. Gotoxy (7, y); cout… Π§ΠΈΡΠ°ΡΡ Π΅ΡΡ >
ΠΠ΅ΡΠ΅Π²ΠΎΠ΄ ΠΏ.2 ΠΊ ΠΏ9, Π±Π°Π·ΠΈΡΡ Β«Π-ΠΠΒ» (ΡΠ΅ΡΠ΅ΡΠ°Ρ, ΠΊΡΡΡΠΎΠ²Π°Ρ, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½ΡΡΠΎΠ»ΡΠ½Π°Ρ)
ΠΠΎΠ³ΠΈΡΠ΅ΡΠΊΠ°Ρ (ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½Π°Ρ) ΡΡ Π΅ΠΌΠ°
Π‘ΠΈΠ½ΡΠ΅Π· ΠΏΡΠΈΠ½ΡΠΈΠΏΠΈΠ°Π»ΡΠ½ΠΎΠΉ ΡΡ Π΅ΠΌΡ ΠΠΠ‘
- 1 Π²Ρ ΠΎΠ΄ — 2ΡΡ.;
- 2 Π²Ρ ΠΎΠ΄Π°- 8 ΡΡ.;
- 3 Π²Ρ ΠΎΠ΄Π° — 11 ΡΡ.;
- 4 Π²Ρ ΠΎΠ΄Π° — 1 ΡΡ.;
Π’ΡΠΈΠ³Π³Π΅Ρ CRS — 2 ΡΡ.
Π555ΠΠ1(DD1).
Π555ΠΠ3(DD2, DD3).
Π555ΠΠ4(DD4, DD5, DD6, DD7).
Π555ΠΠ1(DD8).
Π555Π’Π6(DD9).
ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½Π°Ρ ΡΡ Π΅ΠΌΠ°
Π’Π΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΡΡ Π΅ΠΌΠ½ΠΎΠΉ ΡΠ°ΡΡΠΈ
Π’Π΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠΉ ΡΠ°ΡΡΠΈ
ΠΠΎΠ΄ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ:
//—————————————————————————————————————;
#include.
//—————————————————————————————————————;
#include.
#include.
#include.
//—————————————————————————————————————;
//inversiya.
inline bool inv (bool b).
{.
return !b;
}.
//—————————————————————————————————————;
//liniya (if s == 0 — gorizontal’naya; else — vertikalnaya).
void line (int x, int y, int dl, bool s = 0).
{.
gotoxy (x, y);
if (!s).
for (int i = 0; i < dl; i++) cout<<" -" ;
else.
{.
for (int i = y; i < y+dl; i++).
{.
gotoxy (x, i);
cout<<" |" ;
}.
}.
}.
//—————————————————————————————————————;
//dlina stroki.
unsigned length (char *str).
{.
unsigned i;
for (i = 0; str[i]≠0; i++);
return i;
}.
//—————————————————————————————————————;
//tablica.
void table (void).
{.
unsigned x, y;
char *str[] = {" | ai" ," | Q1″ ," | Q2″ ," | Zi" ," | x1″ ," | x2″ ," | S1″ ," | R1″ ," | S2″ ," | R2″ ,.
" | Q1(t+1)" ," | Q2(t+1)" ," | ai (t+1)" ," | y1″ ," | y2″ ," | Wi" };
x = 1; y = 2;
unsigned ix = x;
gotoxy (x, y);
line (x, y,17,1);
for (int i = 0; i < sizeof (str)/sizeof (str[1]); i++).
{.
gotoxy (ix, y);
if (length (str[i]) > 4) ix += 9;
else ix += 4;
cout<
line (ix, y,17,1);
}.
bool x1 = 0, x2 = 0;
int counter1 = 0, counter2 = 0;
bool S1, R1, S2, R2, Q1, Q2, Qt1, Qt2, y1, y2;
int a = 1;
for (int i = 0; i < 16; i++).
{.
gotoxy (11, y); cout<<" ai" ;
gotoxy (7, y); cout<<" «;
gotoxy (3, y); cout<<" «;