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

vimmi

Honorable
Sep 11, 2012
2
0
10,510
0
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
 

Sunius

Distinguished
Dec 19, 2010
391
0
19,060
35
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!
 

Sunius

Distinguished
Dec 19, 2010
391
0
19,060
35
This is written as the top topic of this forum:

Read before asking for programming assignment help
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.
 

randomizer

Distinguished
Jul 24, 2006
880
0
19,260
62


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.
 
Thread starter Similar threads Forum Replies Date
M Apps General Discussion 2
H Apps General Discussion 3
A Apps General Discussion 1
Y Apps General Discussion 1
L Apps General Discussion 5
O Apps General Discussion 1
S Apps General Discussion 2
A Apps General Discussion 1
P Apps General Discussion 1
A Apps General Discussion 1
T Apps General Discussion 1
Y Apps General Discussion 1
I Apps General Discussion 2
T Apps General Discussion 1
S Apps General Discussion 2
P Apps General Discussion 1
M Apps General Discussion 6
U Apps General Discussion 2
R Apps General Discussion 1
V Apps General Discussion 4
Similar threads
Write a menu driven program which has following options 1. Factorial 2. Prime or not 3. Odd or even. 4. Exit. Once the menu
Write a program in C++ using classes and function overloading, to calculate volume of Cube, Cuboid and a Cylinder, the program
Write a C program that computes and prints out an approximate number of primes not exceeding a given number, x .
Write a program to calculate commission for the input valu of sales amount
Could you please help me write a cpp code for an assignment I have in school for juice
how to write a calculator program that will ask the user if he/she wann continue using loop
online4. Write the program to declare Single dimensional array that stores (5) integer values and perform following operations
Write a program for a multiple choice survey.
1st question : 210 points. Write a program to simulate a keyboard with given keys and their operation. You need to print the f
palindrome is a word, phrase, or sequence that reads the same backwards as forwards. Given a palindrome write a program to pri
Write a C++ program to help the Administration of a football league to manipulate the list of players registered in different
write a program to create a frame by creating an object to the subclass of an frame class
1. Write a program that outputs the greatest common divisor of two positive integers. For example, if you input two positive
Write Single Thread program in Posix Thread
Write a program to accept three names ( Anisha , Aviral and Rahul ) and display them in the following way : ANISHA AVIRAL RAHU
java program to write an array of student objects into a file and to append student information to the same file
Write a program that reads 3 integers as input and prints the second largest of these three numbers. Example: Input: 3 4 5 Out
Write a program that will receive the first name ,last name,age,complexion (fair/dark),weight (kg)and height (m2) of 5 individ
batch file writing
Write own programm? NB

ASK THE COMMUNITY

TRENDING THREADS