import java.util.Scanner;

 

public class Searching

{

public static void main(String[] args)

{

int a[] = {3,5,18,9,35,87,4,90,34,23};

int i,cari,k=0;

boolean OK=false;

Scanner Input = new Scanner(System.in);

for(i=0;i<a.length;i++)

{

System.out.print(a[i] + ” “);

}

System.out.println();

System.out.print(“Input yang dicari : “);

cari = Input.nextInt();

for(i=0;i<a.length;i++)

{

if(cari==a[i])

{

OK = true;

k = i+1;

break;

}

}

if(OK)

System.out.print(“Data ditemukan elemen ke – ” + k );

else

System.out.print(“Data tidak ditemukan”);

}

}