I want to make a program which can ask the user YES/NO answer and if YES then the program continues otherwise stop. i have made the program but doing some mistake..
The break statements that are there just exit the switch statement.
If they've entered N, you also want to break out of the for loop.
Are they going to do at least one set of number entries? You could use a do .. while loop - and loop while their response is yes. Also - I might convert the case of their Y/N input so the program recognizes both n and N, y and Y.