
Patrick B. answered 06/23/21
Math and computer tutor/teacher
f = openFILE();
while not end-of-file(f)
reads the next record from the file
if not end-of-file(f)
if record contains A then
iReturn = Q.push(A);
if iReturn==FAILURE
output Queue Push FAILS - perhaps too many records
end-if
else
x = Q.pop()
if (x==NULL)
output Queue POP FAILS - pehaps popping empty queue
end-if
end-if
else
break
closeFile(f);