你好:这个很简单的实现方法,你可以参考下
int i = 12343465;
int m = 0;
while (i != 0) {
m =i%10;
System.out.print(m);
i = i/10;
}
输入一个三位整数n,个位a=n%10;十位b=n/10%10;百位c=n/100;然后输出abc就行了
不懂可追问
public static void main(String[] args) {
System.out.println("请输入3位的整数");
Scanner in = new Scanner(System.in);
int cr = in.nextInt();
int b = cr / 100;
int s = cr / 10 %10;
int g = cr % 10;
System.out.println("倒序:"+g+" "+ s + " "+b);
}