using System;
using System.Linq;
using System.Text.RegularExpressions;
namespace MyCompiler
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine(findNumber(new int[]{ -2, 6, 4, 5, 7, -1, 7, 1, 3, 6, 6, -2, 9, 10, 2, 2}));
}
public static int findNumber(int[] arr)
{
arr = arr.Where(x => x >= 0).ToArray();
Array.Sort(arr);
int Min = arr.Min();
while((arr.Contains(Min)))
{
Min++;
}
return Min;
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: