Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- class Task6_6_3 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- List<Integer> ints = new ArrayList<Integer>();
- int count = sc.nextInt();
- while (count != 0) {
- ints.add(count);
- count = sc.nextInt();
- }
- for (int i = 1; i <= 9; i++) {
- int step = 0;
- for (int j = 0; j < ints.size(); j++) {
- if (ints.get(j) == i)
- step++;
- }
- System.out.print(step + " ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment