Preview:
import java.util.*;
public class ArrayCount{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int count=0;
        System.out.println("Enter size of an array");
        int n=sc.nextInt();
        int[] arr=new int[n];
        System.out.println("Enter "+n+ " elements");
        for(int i=0;i<arr.length;i++)
        {
            arr[i]=sc.nextInt();
        }
        System.out.println("Enter target value");
        int target=sc.nextInt();

        for(int ele:arr)
        {
            if(ele>=target)
            count++;
        }
        System.out.println("Arrays elements are"+Arrays.toString(arr));
        System.out.println("Target"+target);
        System.out.println("number of elements >"+target+"are"+count);
    }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter