using System.Collections.Generic;
public static void Main()
FindAllNumbers obj = new FindAllNumbers();
public class FindAllNumbers
public int[] first = new int[] { 2, 4, 6, 9, 10, 11, 12, 13, 14, 15,16,19 };
public int[] second = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12, 12, 17,17,17,17,17,18,19 };
for (int i = 0; i < first.Length; i++) {
if (second[j+1] > first[i])
Console.WriteLine("First arr item = {0}, second array item = {1}", first[i], second[j - 1]);
while ((j == second.Length) || (second[j] < first[i]));
Console.WriteLine("First arr item = {0}, second array item = {1}", first[i], second[j - 1]);
if (first[i] > second[second.Length-1])
Console.WriteLine("First arr item = {0}, second array item = {1}", first[i], second[j]);