Posts
 
Reputation
Joined
Last Seen
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
1 Commented Post
0 Endorsements
Ranked #107.68K
~1K People Reached
Favorite Forums
Favorite Tags
c++ x 1

1 Posted Topic

Member Avatar for vishalonne

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; } } }

Member Avatar for DIVYANSHI MANGAL
0
1K

The End.