如题
------解决方案--------------------
上面写错个地方。
- Java code
public class Test { public static void find() { int num = 102,count = 0; int a,b,c;//百,十,个 while(num <= 987){ a = num / 100; b = (num - a * 100) / 10; c = num % 10; if(a != b && a != c && b != c){ System.out.println(num); ++count; } ++num; } System.out.println("count = " + count); } public static void main(String[] args) { find(); }}