Basic

Breaking the loop and starting the program from beginning

views

6:46
You have already seen the usage of break in the code for switch. If we want to stop the loop for any reason when it is in progress, then break is used. The program where we did not know the number of voters can also be written using while and break. The rest of the program remains the same, only a small change is needed.