char c =sc.next().charAt(0);while(true){if(c=='c'||c=='d'){System.out.println("请输入字母:");c =sc.next().charAt(0);}else{break;}}