public static void Main()
string anyno = "1 2 3 3 4 4 8 2 1";
char[] str = anyno.ToCharArray();
for( int i= 0; i<str.Length; i++)
for( int j= i+1; j<str.Length; j++)
if(str[i] == str[j] && str[i] != '0')
if(count == 1 && str[i] != '0')
Console.WriteLine(str[i]);