int count=0; Scanner scanner=new Scanner(System.in); System.out.println("请输入任意一个整数"); long y = scanner.nextInt(); for(;y!=0;y/=10){ //System.out.println(y%10); count++; } System.out.println(count);
一只名叫tom的猫
浏览 635回答 1
1回答
慕田峪7331174
int num = 666;String str = String.valueOf(num);System.out.println(str.length());for(char c : str.toCharArray()){System.out.println(c);}