Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

how do i create a chess board to look like this: ****** ##### ***** ##### ***** ****** ##### ***** ##### ***** ****** ##### ***** ##### ***** ##### ***** ##### ***** ##### ##### ***** ##### ***** ##### ##### ***** ##### ***** ##### etc...

Computer Science
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

in java.
- have a flag that will determine whether you print * or # - loop as many times as you need to print * and # and switch the flag after each loop - determine how many rows you want before changing the beginning character that's an initial guide!
if((j%2==0 && i%2==0)||(j%2!=0 && i%2!=0)){ for(int k=0;k<6;k++){ if(a[i]==j) printQ(i); else System.out.print("***************\t###############\t***************\t###############\t***************\t###############\t***************\t###############\n");//****************\t###############\t***************\t###############\t***************\t###############\t***************\t###############\n***************\t###############\t***************\t###############\t***************\t###############\t***************\t###############\n***************\t###############\t***************\t###############\t***************\t###############\t***************\t###############\n***************\t###############\t***************\t###############\t***************\t###############\t***************\t###############\n"); } } if((j%2!=0 && i%2==0)||(j%2==0 && i%2!=0)) for(int k=0;k<6;k++) if(a[i]==j) printQ(i); else System.out.print("###############\t***************\t###############\t***************\t###############\t***************\t###############\t***************\n");//###############\t***************\t###############\t***************\t###############\t***************\t###############\t***************\n###############\t***************\t###############\t***************\t###############\t***************\t###############\t***************\n###############\t***************\t###############\t***************\t###############\t***************\t###############\t***************\n###############\t***************\t###############\t***************\t###############\t***************\t###############\t***************\n"); }

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

my print Q(i): takes it to antoher method that checks if that "box" should get a special symbol and will replace the * or # with the symbol. but it doesnt work!!!AHHH!!
Let's assume for now that we don't want to pass some of our parameters about all over the place and instead we will use some class fields to store info. Specifically: int rows = 8; int cols = 8; int cellHeight = 3; int cellWidth = 5; Now, you might create some functions to perform the work for you: void printBoard() { // we are going to call printRow() "rows" times } void printRow(int currRow) { // a row is actually comprised of cellHeight sub rows // for each subrow we are going to call printCell() "cols" times } void printCell(int currRow, int currCol) { // this cell will print either "*" or # repeated cellWidth times // what does (currRow +currCol ) % 2 give you? }
thank you so much, you really helped. but how do i make it tabbed? wher do i put the \t? because right now its just one long thing going down one collumn. i want it to be a board!:(
you can select a "column separator" either space or tab or whatever and print it as the last thing you do in printCell() Let me know if you would like to see some more of a complete example.

Not the answer you are looking for?

Search for more explanations.

Ask your own question