Why break statement has errors inside user-defined function?
Can you provide an example?
Seeing ur code.. It looks like u don't know where to use break... Break statement is used to terminate loop... For, while, do-while... And in switch case..... How can u use it in else block of ur code
Break is used for terminating loops... And return is used for terminating a function in simple words
To end your program, you should use break statement (but this is only a problem on user-defined functions).