- public static int method(){
- int s,a,b,c,d;
- for(s = 'A';s<='D';s++){
- if(s != 'A')
- a = 1;
- else a = 0;
-
- if(s == 'C')
- b = 1;
- else b = 0;
-
- if(s == 'D')
- c = 1;
- else c = 0;
-
- if(s != 'D')
- d = 1;
- else d = 0;
-
- if((a+b+c+d) == 3){
- System.out.println((char)s);
- break;
- }
- }
-
- return 0;
- }
- }
复制代码 Java编程实现。。。。。。 |