import java.util.Scanner;
public class Test{
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
System.out.println("请输入10个数");
int[] nums = new int[10];
int[] coun = new int[4];
StringBuffer strb = new StringBuffer();
for(int i=0;i<10;i++)
{
nums[i] = scanner.nextInt();
strb.append(nums[i]+" ");
switch (nums[i])
{
case 1:
coun[0] += 1;
break;
case 2:
coun[1] += 1;
break;
case 3:
coun[2] += 1;
break;
default:
coun[3] += 1;
break;
}
}
System.out.println("输入的10个数为:"+strb.toString());
System.out.println("数字1的个数::"+coun[0]);
System.out.println("数字2的个数:"+coun[1]);
System.out.println("数字3的个数:"+coun[2]);
System.out.println("非法数字的个数:"+coun[3]);
}
}