package com.itheima.fiest;
import java.util.*;
public class lianxi {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("请输入十个数字");
int[] num=new int[10];
int[] count=new int[4];
for(int i=0;i<num.length;i++) {
System.out.print("请输入第"+(i+1)+"个数字:");
num[i]=input.nextInt();
switch(num[i]) {
case 1:
count[0]++;
break;
case 2:
count[1]++;
break;
case 3:
count[2]++;
break;
default:
count[3]++;
break;
}
}
System.out.println("1出现的次数:"+count[0]);
System.out.println("2出现的次数:"+count[1]);
System.out.println("3出现的次数:"+count[2]);
System.out.println("非法字符出现的次数:"+count[3]);
}
}