chenxi1944362410
package erase;
import java.util.Scanner;
public class 求几位并逆序打印 {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int sum = 0;
        System.out.print("该数逆序输出为:"+'\n');
        while(n!=0) {
            int count= 0;
            count=n%10;
            n/=10;
            sum++;
            System.out.print(count);
        }
        System.out.print('\n'+"该数有的位数为:"+'\n'+sum);
    }

}

 

分类:

JAVA

技术点:

相关文章:

  • 2021-12-30
  • 2021-11-23
  • 2021-11-27
  • 2021-11-23
  • 2021-07-01
  • 2021-12-14
  • 2021-09-11
  • 2021-09-11
猜你喜欢
  • 2021-09-27
  • 2021-06-16
  • 2021-08-26
  • 2021-12-14
  • 2021-04-19
  • 2020-04-18
  • 2021-05-20
相关资源
相似解决方案