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;
}

}
  }
}
posted on 2018-05-31 14:49  背起全世界の蜗牛  阅读(604)  评论(0编辑  收藏  举报