[Solved] for loop repeats over and over


The problem occurs on the price Method not the number, if the user enters 50 , you are checking the matrix seatsArray[][] for available seats :

Solution: you need to add a boolean when seat gets reserved so you can set it true and escape the loop which is on the for not the the if

1

solved for loop repeats over and over