Joined
Last Seen
-3 Reputation Points
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
0 Endorsements
Ranked #107.68K
1 Posted Topic
maybe you can use it like this.. int b[n][m]; for (i=0;i<n;i++){ if ((i%2)==0){ for (j=0;j<m;j+=2) { b[i][j]=2; } for (j=1;j<m;j+=2){ b[i][j]=4; } } else if ((i%2)!=0){ for (j=1;j<m;j+=2){ b[i][j]=2; } for (j=0;j<m;j+=2){ b[i][j]=4; } } }
The End.