WAP to search a value in a array using linear search.Value should be accepted from the user

17/10/2013 21:28
import java.io.*;
public class linearsearch
{
public static void main(String args[])throws IOException
{
System.out.println("please enter a value");
InputStreamReader ir=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(ir);
int []a={81,90,100,26};
int b=a.length;
String c=br.readLine();
int value=Integer.parseInt(c);
int pos=0;
for(int i=0;i
{
if(a[i]==value)
{
pos=i+1;
}
}
if(pos>0)
System.out.println("the array is found and it is at "+pos);
else
System.out.println("the array is not found");
}
}