NQUEEN problem input number problem

sir how to take input without knowing the number of test cases as in the queston below
plz refere the link-

Hi juhi , in every line you are input no of queens and then positions , if the input of number of queen is 0 then stop the problem .

1 Like