Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt(), res = 0;
- int[] arr = new int[n];
- for (int i = 0; i < n; i++)
- {
- arr[i] = sc.nextInt();
- if (!(arr[i] > 0 && arr[i] < 10))
- res++;
- }
- System.out.println(res);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement