输入一个正整数,输出其逆序 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数值被颠倒");
}
}