public class HelloWorld{public static void main(String[] args){int num = 999;
int count=0;for(count=0;count<=9;count++){int a=(10^count);if ((num/a)>=1){continue;}
{System.out.println("这是个"+count+"位的数!");}break;}
}}
输出放到循环外面