Okay, let's make some observations on the goto code:
Y: A
B
if a GOTO X
C
if b GOTO Y
X: D First, Y is always executed at least once because the test to GOTO Y is at the end of the "block". That suggests a loop that tests the condition at the end rather than at the beginning, so we'll throw in a do..while for Y (# denotes a comment):
#Y:
DO
A
B
if a GOTO X
C
WHILE b
X: D If you're not allowed to use a special loop like that in your pseudocode, then you have the right of it in setting a flag to a successful condition for the first iteration.
GOTO X is a classic break from the loop, so if your pseudocode can support it, that's the easiest way:
#Y:
DO
A
B
if a BREAK
C
WHILE b
D However, even though that's likely the solution that you would take in real code, BREAK is akin to GOTO in that it makes an unconditional jump, so it might not be an acceptable solution in this case. The alternative is what you did, to use flags to drive the loop:
#Y:
done = false
DO
A
B
if a done = true
C
WHILE b AND done <> true
D All in all, this saves you a potentially confusing conditional branch inside the loop. But your solution is still correct. :)