Solution :-
import java.util.*;
class p5{
public static void main(){
Scanner sc =new Scanner(System.in);
int i,pos=0,flag=0;
int a[]=new int[10];
for(i=0;i<10;i++){
System.out.println(“Enter number”);
a[i]=sc.nextInt();
}
System.out.println(“Enter number you want to search”);
int num=sc.nextInt();
for(i=0;i<10;i++){
if(a[i]==num){
pos=i;
flag=1;
break;
}
}
if(flag==1){
System.out.println(“Number “+num+” is present at location “+(pos+1));
}
else
System.out.println(“Number not found”);
}
}