RT

解决方案 »

  1.   

    int a=0,b=0,c=0;int num=0;
    int temp=0;
    for(int i=1;i<=9;i++)
    {
    temp=100*i;
    for(int j=0;j<=9;j++)
    {
    temp+=j*10;
    for(int k=0;k<=9;k++)
    {
    temp+=k;
    System.out.println(temp);
    }
    }
    }
      

  2.   

    public class SimpleTest { public static void main(String[] args) {
    for(int i = 0; i < 1000; i ++){
    if(i <10){
    System.out.println("00" + i);
    }else if(i < 100){
    System.out.println("0" + i);
    }else{
    System.out.println(i);
    }
    }
    }
    }
      

  3.   


    /**
     * @author troy(J2EE)
     * @version 1.0  1995年的3月23日
     */
    public class Test {    public static void main(String[] args) {
    long s=0;
            while(s<1000){
    System.out.println(String.format("%1$03d",s));
    s++;
            }
        }
    }