I have been asked to find the inefficiency in a piece of pseducode. I've looked at it but can't see it.
IF count > 10 THEN
WHILE x < 0 DO
INPUT x
ENDWHILE
ENDIF
My understanding:
Count is evaluated. If count is <10, the app moves onto the next section. If count is > 10, X is evaluated. Until x is <0, the user will keep being prompted to input x. Once they input x>=0, the loop finishes.
Please note: this is one question on a mock test - it is the whole code. I'm supposed to find the problem with this snippet. eg. there is no mention of x being a value outside of the IF section.