See More

import java.util.Scanner; public class PositionSearch { public static void main(String args[]) { /** * Input: * In this program we take * n = number of integers in the array * a[n] = n integers are inserted * s = search element * * Output: * current position of the search element * sorted array * new position of the search element in the sorted array */ Scanner in=new Scanner(System.in); int a[]=new int[100]; int n,i,j,s ='\0',temp,count = 0; n=in.nextInt(); for (i=0;i 0) { System.out.println(count); } else { System.out.println("Enter a search element present in the array:"); continue searchAgain; } } for (i=1;i0&&a[j]