I wrote the following program... I didn't compile it yet because I am looking for the way to break a loop from switch statement. I tried Google, but no results... Any ideas? thanks.
Variable ans can't have two values, so that && should be ||. Anyway, that is not what I want. I could use simply while for that and big if/else statements, but I wanted to do it this way :)
yeah, but if I return 0, the program will end. There might be some info to write like total number of times the loop was executed or the sum of something used in program. Anyway, thanks.