Advertisement
Guest User

Untitled

a guest
Apr 8th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. int diag1 = abs(count1 - count2);
  2. int diag2 = (count1 + count2) - 7;
  3. int j = 0;
  4.             for (diag1; diag1 < 8; diag1++) {
  5.                 if (a[diag1][j] != temp) {
  6.                     a[diag1][j] = 2;
  7.                     j++;
  8.                 }
  9.                 else
  10.                     j++;
  11.             }
  12.             j = 7;
  13.             for (diag2; diag2 < 8; diag2++) {
  14.                 if (a[diag2][j] != temp) a[diag2][j] = 2;
  15.                 else
  16.                     j--;
  17.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement