输入一个正整数,输出其逆序 NegativeSequence.java

import java.util.Scanner;
public class NegativeSequence{
public static void main(String[] args){
System.out.println("请输入一个整数");
Scanner XX=new Scanner(System.in);
int number=XX.nextInt();
while(number!=0){
int values=number%10;
System.out.print(values);
number=number/10;
}
System.out.print("\n数值被颠倒");
}
}
posted @ 2014-07-06 07:39  穿越地平线  阅读(1589)  评论(0编辑  收藏  举报