Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1.     for (int i = 1; i < roz - 2; i++) {
  2.         if (tab[i-1] == 'x') {
  3.             if (tab[i] == 'x') {
  4.                 memset(tab_p + i, '-', 1);
  5.             }
  6.             else if (tab[i + 1] == 'x') {
  7.                 memset(tab_p + i, '-', 1);
  8.             }
  9.             else {
  10.                 memset(tab_p + i, 'x', 1);
  11.             }
  12.         }
  13.         else if (tab[i] == 'x') {
  14.             memset(tab_p + i, 'x', 1);
  15.         }
  16.         else if (tab[i+1] == '-') {
  17.             memset(tab_p + i, '-', 1);
  18.         }
  19.         else {
  20.             memset(tab_p + i, 'x', 1);
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement