Array value:

Search value:


*-Press submit after entering every value of the array and finally enter the search value


ALGORITHM FOR LINEAR SEARCH

1.Start
2.Get input elements as 'array','count' as the number of elements
3.Get the search element 'search'
4.index=0
5.while(index less_than count) do
5.1 if(array[index]==search)
{
print "element found at position"[index]
break
}
5.2 else
index++;
6.Stop