using System;
public class Program
{
public static void Main()
bool encontrou = false;
int numPesquisar = 7;
int[] a = new int[] {3, 7, 4, 9, 2, 6, 7, 8, 9, 2};
for (int i = 0; i < a.Length; i++)
if (a[i] == numPesquisar)
encontrou = true;
}
Console.WriteLine("O valor {0} está presente no array: {1}", numPesquisar, encontrou);