public void present() { foreach (int pos in _repo.get_data()) { Console.Write(pos); } }
public void present() { foreach (int pos in _repo.get_data()) { if (pos > 0) { Console.Write(1); } else if (pos < 1) { Console.Write(0); } } }
public void present() { int[] repoData = _repo.get_data(); int[] output = new int[repoData.Length]; for (int ii = 0; ii < repoData.Length; ii++) { if (repoData[Math.Max(0, ii - 1)] > 0 || repoData[Math.Min(ii + 1, repoData.Length - 1)] > 0) { Console.Write(1); } else { Console.Write(0); } } }