Sign in with
Sign up | Sign in
Your question

Write a program that randomly fills in 0’s and 1’s into an 8 X 8 checker board,

Last response: in Applications
Share
September 11, 2012 1:01:30 PM

Write a program that randomly fills in 0’s and 1’s into an 8 X 8 checker board, prints the board, and finds the rows, columns or diagonals with all 0’s or 1’s
a b L Programming
September 11, 2012 1:04:38 PM

I suggest that you do your own homework.
a b L Programming
September 11, 2012 5:28:34 PM

Say R is row number, and C is column number. Let's say checker board is represented in 2-dimension array.

For even results of R + C, you want to fill it with zeroes (0, 2, 4, etc) and for odd results of R + C, you want to fill it with ones (1, 3, 5, etc).

Just loop through all the array members and fill it!
Related resources
September 12, 2012 11:22:21 AM

will u plz give me the coding of this program in java
a b L Programming
September 12, 2012 12:04:03 PM

This is written as the top topic of this forum:

Read before asking for programming assignment help
Quote:
Before you post a thread asking for help with your homework, please follow these simple instructions so that you can help us help you:


1. State at the beginning of your post that it is an assignment. Don't pretend that you are solving a problem in a professional application.


2. Don't post your programming assignment and just expect to be given the code to solve it. You usually won't get it.


3. Post some code that you have already written (yes you, not somebody else) and describe how you've gone about solving the problem already.


4. Describe what you are trying to do and what the problems are in detail. We can't read your mind.


5. Use the forum's [ code ] and [ /code ] tags (without spaces) to wrap any code that you post. It will preserve formatting and make it much easier to read.


6. Don't always expect to be given the complete solution. You may be given a partial solution or just some guidance to help you in the right direction. Ultimately, you are being marked on how well you understand what you're doing, not us. We don't just want you to understand how to copy and paste!


So no, I cannot give you code. However, if you start it yourself, I may be able to correct it.
a b L Programming
September 12, 2012 1:01:08 PM

vimmi said:
will u plz give me the coding of this program in java


Thanks for saying "please", but no, we can't do your assignment for you. That doesn't help you understand anything.

If you make an attempt at it yourself we can guide you to the solution (guide, not give). The first two requirements are very simple. The last one will require a bit more thought.
!