justify"> {D} (5,0,0,0),
{A} (5,0,0,0));
num: set of char = ['0 '.. '9'];
ee: boolean = true; s: string;
i, q, oq, n, ns: byte;
m, x: real;
sign: shortint;
assign (input, 'input.txt');
assign (output, 'output.txt');
reset (input);
rewrite (output);
readln (s);
m: = 0; x: = 0; n: = 0; i: = 1; q: = 1;
writeln (s);
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 {номери}
if s [i] = '-' then ns: = 3 else {}
if s [i] = '.' then ns: = 4 else ns: = 0; {символу}
case ps [q, ns] of
1: m: = m * 10 + byte (s [i]) -48;
2: sign: = 1;
3: sign: = -1;
4: x: = x * 10 + byte (s [i]) -48;
5: begin x: = x * 10 + byte (s [i]) -48; inc (n); end;
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 = 4) or (q = 7) then
begin
for i: = 1 to n do x: = x/10;
m: = m + sign * x;
writeln ('0 '# 13 # 10,' M = ', m: 2:2,' N = ', n);
end else writeln ('3 ');
close (input);
close (output);.
Варіант № 7: ms: array [1 .. 3,1 .. 3] of byte = (
{Ц - +}
{S} (2,0,0),
{Z} (2,3,3),
{P} (2,0,0)); ps: array [1 .. 3,1 .. 3] of byte = (
{Ц - +}
{S} (1,0,0),
{Z} (1,3,2),
{P} (1,0,0));
num: set of char = ['0 '.. '9'];
ee: boolean = true; s: string;
i, q, oq, ns: byte;
col: byte;
...