CS321 Answers
CS321 Answers
CS321 Answers
Set count to 0
WHILE (count < 5)
Set count to count + 1
IF (RanFun())
Write count, ' '
ELSE
Enqueue(myQueue, count) True
WHILE (NOT IsEmpty(myQueue))
Dequeue(myQueue, number)
Write number, ' '
The following output is possible using a queue: 1 3 5 2
4