B What would the register contain if only motor C was ON and the motors were turning in a BACKWARDS direction?
c What would the register contain if motor B and motor C were both ON but
B was turning in a backward direction and C was turning in a forward
direction?
d What would be the effect if the register contained the following?
1 1 1 1 1 1 1 1
mas = array[1..11] of integer;
procedure p(a: mas; k: integer);
var t: integer;
begin
if a[k] <> 0 then
begin
t := a[k];
if a[k] < 0 then writeln(a[k]);
p(a, k + 1);
end
else t := -1;
if t > 0 then writeln(t);
end;
var
n, i: integer;
a: mas;
begin
randomize;
write('Размер последовательности от 2 до 10 n= ');
readln(n);
writeln('Последовательность');
for i := 1 to n do
begin
repeat
a[i] := -10 + random(21);
until a[i] <> 0;
write(a[i]:4);
end;
writeln;
a[n + 1] := 0;
writeln('Преобразованная последовательность');
p(a, 1);
end.