ign="justify"> {Q} (1,0));
num: set of char = ['0 '.. '9'];
sym: set of char = ['A' .. 'Z', 'a' .. 'z'];
ee: boolean = true; s: string;
i, q, oq, ns: byte;
col: byte;
n: array [1 .. 100] of byte;
m: array [1 .. 100] of word;
assign (input, 'input.txt');
assign (output, 'output.txt');
reset (input);
rewrite (output);
readln (s);
col: = 1; fillchar (n, 100,0);
fillchar (m, 200,0);
writeln (s); i: = 1; q: = 1;
while (i <= byte (s [0])) and ee do
begin
oq: = q;
if s [i] in num then ns: = 1 else {Визначення}
if s [i] = '-' then ns: = 2 else ns: = 0; {номери символу}
case ps [q, ns] of
1: begin inc (n [col]); inc (M [col], byte (s [i]) -48); end;
2: inc (col);
end;
q: = ms [q, ns];
if ns = 0 then
begin
ee: = false;
writeln (1);
end else
if q = 0 then
begin
ee: = false;
writeln (2);
end;
inc (i);
end;
if ee then
if q = 3 then
begin
writeln ('0 ');
for i: = 1 to col do write ('n (', i, ') =', n [i], # 32);
for i: = 1 to col do write ('m (', i, ') =', m [i], # 32);
writeln;
end else writeln ('3 ');
close (input);
close (output);.
Варіант № 6: ms: array [1 .. 7,1 .. 4] of byte = (
{Ц + -. } p align="justify"> {S} (2,0,0,0),
{T} (2,3,3,0),
{B} (4,0,0,0),
{P} (4,0,0,5),
{C} (6,0,0,0),
{D} (7,0,0,0),
{A} (7,0,0,0)); ps: array [1 .. 7,1 .. 4] of byte = (
{Ц + -. } p align="justify"> {S} (1,0,0,0),
{T} (1,2,3,0),
{B} (4,0,0,0),
{P} (4,0,0,0),
{C} (5,0,0,0),