using System;
public class Program
{
public static void Main()
int[] numbers = {8,14,5,9,16,32,45,86,32,1,78,34};
int length = 11;
int ff = 45;
//Linear search the array for the value 45, output the index of 45
//Linear search the array for the value 102, return -1 if the valueis not found
//DO NOT USE indexOf or other array methods...it's got to be old school
for (int i=0; i < length; i++)
int num = numbers[i];
if (num == ff)
Console.WriteLine("found number at index {0}", num);
break;
}
else
Console.WriteLine("number not found");
Console.ReadLine();