1.Take number of rows as input from user
2.Loop until all rows are done
3.According to the pattern, number of elements in a row = row number itself. Loop for printing elements in 1 row. If the element number you are printing is odd ,print 1, if it is even print 0.
Start coding and post back if you have any further problems in your code.