package zuoye; import java.util.Scanner; public class LianXi{ public static void main(String[] args){ Scanner s = new Scanner(System.in); System.out.println("输入一个正整数"); int i = s.nextInt(); int a =0; for(;i>0;i/=10){ a++; System.out.print(i%10); } System.out.println("\n"+a); } }
相关分类