Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 1; i < roz - 2; i++) {
- if (tab[i-1] == 'x') {
- if (tab[i] == 'x') {
- memset(tab_p + i, '-', 1);
- }
- else if (tab[i + 1] == 'x') {
- memset(tab_p + i, '-', 1);
- }
- else {
- memset(tab_p + i, 'x', 1);
- }
- }
- else if (tab[i] == 'x') {
- memset(tab_p + i, 'x', 1);
- }
- else if (tab[i+1] == '-') {
- memset(tab_p + i, '-', 1);
- }
- else {
- memset(tab_p + i, 'x', 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement