public static void printbyte(int num){//接收输入数
int count;
int num_ = num ;
int i ;
for( count = 1 ; num_ != 0 ; count ++){//统计输入的数字中个数
num_ = num_ / 10;
}
int numbers [ ] = new int [count - 1];//根据个数定义数组长度
for( count = 1 , i = 0 ; num != 0 ; count ++ , i ++ ){
numbers [i] = num % 10 ;
num = num / 10 ;
}
for (int j = 0 ; j < numbers.length ; j ++)//倒序打印
System.out.print(numbers [j] + " ");
System.out.println();
for (int j = numbers.length - 1 ; j >= 0; j --)//顺序打印
System.out.print(numbers [j] + " ");
}