Code Pretty Much Want One Small Problem Run Say Like Queens 4 Gives 4 Queens 2 Solutions I Q37298645

I have this code and it pretty much does what i want but i haveone small problem when i run it and do say like Queens 4 it givesme 4 Queens has 2 solutions but when id do Queens -v 4 it gives methe full answers of

(2,4,1,3)

(3,1,4,2)

which are right but the last thing it says is -v queens has 2solutions I need to change the -v in the sentence to the numberthat is given but i can’t find what in the code is messing thatup

class Queens {

static void placeQueen(int[][] B, int i, int j){
int count = 0;
int n = B.length;
if(

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.