6、赋初值 BufferedReaderbr=newBufferedReader(newInputStreamReader(System.in)); inta=Integer.parseInt(br.readLine()); //读取一个整数 while(a!=-1){ s+=a; //累加 switch(a/10){ case 0: case 1: case 2: case 3: case 4:
7、 case 5:b++;break;//计数增1 case 6:c++;break; case 7:d++;break; case 8:e++;break; case 9:f++;break; } a=Integer.parseInt(br.readLine()); } System.out.println("优秀人数:"+f); System.out.println("良好人数:"+e); System.out.print