LINEAR SEARCHING PROGRAM IN JAVA || SEARCHING

LINEAR SEARCHING PROGRAM IN JAVA || SEARCHING

LINEAR SEARCHING PROGRAM

class liner_search
{
    public static void main()
    {
        int a[]={478,783,34789,376,34879};
        for(int i=0;i<a.length;i++)
        if(a[i]==376)
        {
            System.out.println("The index no of the Number you input is : "+i);
        }
    }
}

OUTPUT

LINEAR SEARCHING PROGRAM IN JAVA || SEARCHING

Post a Comment

0 Comments