having some trouble with online class problem

I have a problem for my online class and cant get help from my instructor. Im completely lost on where to start here is the problem. I appreciate any help even if you can point me in the right direction.
First I have to open a file called that will contain 2 numbers in it. The first number will be the number of rows that will be in your table and the second number will be the number of columns. You can assume that both numbers are positive and less than 20. Using this data, print both to the screen and also to a file called Printout.txt, a table of 0s and 1s containing the specified row and column values. The rows should start with 0s and alternate between 0s and 1s. As for the looping constructs needed for this program, you can use only 2 loops.
I just have no clue where to start i can open the file and write to file but what function would i use to create the rows and alternate 0 and 1's???
I just have no clue where to start i can open the file and write to file but what function would i use to create the rows and alternate 0 and 1's???


When you think about alternate what do you think about? So you have to write out 0's and 1's, how many 'choices' is that. Looks like 2. First do this, write a loop that prints out all 0's for the first row, then on the second row it prints out 1's.

Step 1:

Print out entire table with zeros (every row).

Step 2:

Make changes such that the 2nd row now prints out 1's (instead of zeros).

Step 3:

Make changes to alternate 0's and 1's.

Start with step 1.
Topic archived. No new replies allowed.