Like the above code, there is a while statement in the main function,
inputUser function in the main function, and there is a while statement outside the
inputUser function. In the process of defining the inputUser function here, the
'continue not successfully in loop' error appears when writing continue because there is no repeat statement within the
inputUser function. How can we solve this?
It would be impossible to use break or continue within the inputUser function for the reason you mentioned. And we can return the value we want when the function ends with a return. So this is possible.
© 2022 pinfo. All rights reserved.