判断一个数是几位数,并且逆序输出

  public static void main(String[] args) {
    		// TODO Auto-generated method stub
    			System.out.println("请输入一个整数:");
    			Scanner input = new Scanner(System.in);
    			int num = input.nextInt();
    			String a = "" + num ;
    			int L= a.length();
    			System.out.println(num+"是" +L + "位数");
    			System.out.print("倒序输出为:");
    			for(int i=0;i

你可能感兴趣的:(javase,基础题)