grade=grade/10; switch(flag){ case 10: System.out.println("车"); break; case 9: System.out.println("笔记本"); . . . . }