标签:逆序输出 system [] scan int rgs break 整数 ==
public class TestNx{
public static void main(String[] args){
System.out.println("请输入几位数的正整数:");
Scanner sc=new Scanner(System.in);
int ia=sc.nextInt();
for(;;){
int num=ia%10; //123
ia/=10;
System.out.print(num+" ");
if(ia==0){
break;
}
}
}
}
标签:逆序输出 system [] scan int rgs break 整数 ==
原文地址:https://www.cnblogs.com/sumboy/p/9058049.html