以下是我编的程序:
TYPE
we=packed array [1..76] of char;
VAR
a:array [1..20] of packed array [1..70] of char;
b:we;
k:char;
i,j:integer;
PROCEDURE xo(b:we); begin
j:=j+1;
for i:=7 to 76 do
b[i]:=a[j,i-6];
write (a[j]) end;
BEGIN
j:=1;
a[1]:='
http://www.acm.org/
';REPEAT
read (b);
if b[1]='V'
then xo(b);
if b[1]='B'
then if j-1=0
then write ('Ignored')
else begin
write (a[j-1]);
j:=j-1 end;
if b[1]='F'
then if a[j+1,1]=' '
then write ('Ignored')
else begin
write (a[j+1]);
j:=j+1 end;
UNTIL b[1]='Q'
END.