Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Modlet {
- public static void main( String[] args ) {
- int N = args.length;
- int[] dataset = new int[N];
- int[] count = new int[10];
- int xx = 0;
- for (int i = 0; i < N; ++i) {
- dataset[i] = Integer.parseInt(args[i]);
- count[i] = 0;
- }
- for (int i = 0; i < N; ++i) {
- for (int j = 0; j < N; ++j) {
- if (dataset[j] == dataset[i]) ++count[i];
- }
- }
- for (int i = 0; i < 10; ++i) {
- System.out.println("[" + i + "s: " + count[i] + "]");
- }
- }
- }
Add Comment
Please, Sign In to add comment