java输入最大10位数,倒数输出(很鸡肋)

public class D {
public static void main(String[] args) { System.out.println("请输入数字(最大十位数):");
Scanner sc = new Scanner(System.in);
int sun = sc.nextInt();
System.out.println("已输入:"+sun);
int result = 0;
int i = 0;
while (true){
int n = sun%10;
if (n == -1){
break;
}
i++;
System.out.println("倒数第"+i+"位="+n);
result = result*10+n;
sun = sun/10; if (sun == 0){
break;
} }
  }
}
上一篇:datanode无法连接到master


下一篇:Javascript模块化编程(一):模块的写法 (转载 学习中。。。。)